Problems & Puzzles: Puzzles

Puzzle 497. Sqrt[p^2+q^2- 9]

Sebastian Martin Ruiz sent the following puzzle:

Prove the following equivalence:

Let p and q two prime numbers, then:

Sqrt[p^2+q^2- 9] is integer if and only if Sqrt[p^2+q^2- 9] is prime.

 

Contributions came from J. K. Andersen, Farideh Firoozbakht, Nick McGrath,

***

JKA wrote:

Proof. If one of p and q is 3 then Sqrt[p^2+q^2-9] equals the other prime
and is an integer.
If p and q are primes different from 3 then p and q are 1 or 2 modulo 3.
Then p^2 and q^2 are both 1 modulo 3, so p^2+q^2-9 is 2 modulo 3.
But no square is 2 modulo 3, so Sqrt[p^2+q^2-9] cannot be an integer.

***

Farideh wrote:

If p and q are two prime numbers, then: Sqrt[p^2+q^2- 9] is integer if and only if Sqrt[p^2+q^2- 9] is prime.

Proof : If Sqrt[p^2+q^2-9] is prime then it's obvious that Sqrt[p^2+q^2-9] is integer.  So we only must show that if m = Sqrt[p^2+q^2-9] is integer then m is prime.

We show it in three cases.

I. If p = q = 3 then m = 3 and m is prime.

II. If only one of the primes p & q equals to 3, let p = 3 then p^2+q^2-9 = q^2 so m = q is prime.

III. If p<>3 & q<>3 then p^2 = 1(mod 3) and q^2 = 1 (mod 3) so p^2+q^2-9 = 2 (mod 3) namely m^2 = 2 (mod 3) , but if m is integer m^2 = 0 (mod 3) or m^2 = 1 (mod 3). Hence in this case m can not be integer and it is impossible.

Hence we conclude that if p and q are two prime numbers and m = Sqrt[p^2+q^2-9] is integer then 3 and m are in the set {p, q}.

***

Nick wrote:

If p= 3 then the equivalence is true since sqrt[p^2+q^2-9]= sqrt[q^2] = q

On the other hand if both p and q are greater than 3 and therefore of the form 1mod6 or -1mod6

Then p^2+q^2-9 = = -7mod6 == 5mod6 .  But 5mod6 is never a square since all squares are 0,1,3 or 4 mod6. Therefore, p and q can not both be greater than 3. Therefore all solutions are of the form p=3 q=any prime and
sqrt[p^2+q^2-9] = q

***
 


 

 

 

Records   |  Conjectures  |  Problems  |  Puzzles