For how many integer values of \(a\) does the equation
\(x^2+ax+8a=0\)
have integer solutions for \(x\)?
We will have (possible) integer solutions when the discriminant is a perfect square
a^2 - 4*8a = b^2
a^2 - 32a = b^2
a ( a - 32) = b^2
(With a little help from WolframAlpha )
We will have a perfect square when
a roots
-49 x = -7 , 56
-18 x = -6 , 24
-4 x = -4 , 8
0 x = 0
32 x = -16
36 x = -24 , -12
50 x = -40 , -10
81 x = -72 , -9