Ta có \(M=\frac{2a+8}{5}+\frac{-a-7}{5}=\frac{2a+8-a-7}{5}=\frac{a+1}{5}\)
Để \(M\inℤ\Leftrightarrow\frac{a+1}{5}\inℤ\Leftrightarrow a+1⋮5\Leftrightarrow a+1\inƯ\left(5\right)=\left\{\pm1;\pm5\right\}\)
Ta có bảng sau :
a+1 | 1 | -1 | 5 | -5 |
a | 0 | -2 | 4 | -6 |
Vậy \(a\in\left\{0;-2;4;-6\right\}\)