+0

integer & prime number solutions for an equation

0
44
1
+45

given the equation x^2 - 2px + p^2 -5p - 1 = 0 which has 2 integer solutions

if p is a prime number, what are the values for p?

edit: thank you so much!

hearts123  Nov 2, 2018
edited by hearts123  Nov 2, 2018

#1
+93911
+3

I just found two, p=3 and  p=7 both work. There may well be many more.

$$x^2 - 2px + (p^2 -5p - 1) = 0\\ x=\frac{2p\pm\sqrt{4p^2-4(p^2-5p-1)}}{2}\\ x=\frac{2p\pm\sqrt{20p+4}}{2}\\ x=\frac{2p\pm2\sqrt{5p+1}}{2}\\ x=p\pm\sqrt{5p+1}\\ \text{since x must have 2 integer solutions, 5p+1 must be a perfect square.}$$

If p=3  then 5p+1=16 which is a perfect square.

If p=7 then  5p+1=36 which is a perfect square.

Melody  Nov 2, 2018
#1
+93911
+3

I just found two, p=3 and  p=7 both work. There may well be many more.

$$x^2 - 2px + (p^2 -5p - 1) = 0\\ x=\frac{2p\pm\sqrt{4p^2-4(p^2-5p-1)}}{2}\\ x=\frac{2p\pm\sqrt{20p+4}}{2}\\ x=\frac{2p\pm2\sqrt{5p+1}}{2}\\ x=p\pm\sqrt{5p+1}\\ \text{since x must have 2 integer solutions, 5p+1 must be a perfect square.}$$

If p=3  then 5p+1=16 which is a perfect square.

If p=7 then  5p+1=36 which is a perfect square.

Melody  Nov 2, 2018