You can put this solution on YOUR website! through guess n check a=6
x^2+(-31+6)=0
x^2-25=0
x=5 x=-5
which 5 and -5 are prime numbers
hope you find a better way to do it.
oh just got it...take the same prime number square it multiply it by -1 then add it to -31 to find the value of a
so for the prime number 2:
2^2=4 * -1
-31+a=-4
a=27
so for the prime number 3:
3^2=9 * -1
-31+a=-9
a=22
so for the prime number 5:
5^2=25 * -1
-31+a=-25
a=6
so for the prime number 7:
7^2=49 * -1
-31+a=-49
a=-11