# Thread: Equation with prime numbers

1. ## Equation with prime numbers

We should find all the (p, q, n) triples, where p and q are prime numbers, n is a natural number and the following equation is true:
n^2=p^2+q^2+p^2*q^2

2. Originally Posted by doug
We should find all the (p, q, n) triples, where p and q are prime numbers, n is a natural number and the following equation is true:
n^2=p^2+q^2+p^2*q^2
Two obvious solutions are (p,q,n) = (2,3,7) and (3,2,7). To proceed, possibly use that any odd number squared is congruent to 1 mod 8, and that there is only one even prime. (Haven't worked it out beyond that.)

3. Proceeding, using the above information you can show that one of p,q is 2 and the other is odd, then if you consider mod 3 you will see the above solutions are the only possible.