Primes with Special Squares

Find the sum of all (positive) prime numbers p < 300 p<300 such that their squares can be expressed as a 3 b 2 a^3-b^2 , for some coprime integers a a and b b .


The answer is 462.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

3 solutions

Mark Hennings
Nov 25, 2013

We want to find integers a , b , p a,b,p such that a 3 = p 2 + b 2 = ( p + i b ) ( p i b ) a^3 \; = \; p^2 + b^2 \; = \; (p + ib)(p - ib) where p p is prime and a , b a,b are coprime. Working the in Euclidean domain Z [ i ] \mathbb{Z}[i] of Gaussian integers, consider the irreducible factors of a a .

  • No integer u Z u \in \mathbb{Z} , with u > 1 u > 1 , can be a factor of p + i b p+ib . If such a u u existed, then it would have to divide p p in Z \mathbb{Z} , and hence would be equal to p p . But this would imply that p p divided b b , and hence that p p divided a a , which would mean that a a and b b were not coprime.

  • No irreducible element ζ \zeta of Z [ i ] \mathbb{Z}[i] exists such that both ζ \zeta and its complex conjugate ζ \zeta^\star divide p + i b p + ib . If such a ζ \zeta existed, then ζ 2 |\zeta|^2 would be a nontrivial integer factor of p + i b p + ib .

If ζ \zeta is an irreducible factor of a a , then it divides exactly one of p + i b p+ib and p i b p-ib (it cannot divide both, for that would make ζ \zeta and ζ \zeta^\star both divide p + i b p+ib ). Since a 3 = ( p + i b ) ( p i b ) a^3 = (p+ib)(p-ib) , if the index of ζ \zeta in a a is α \alpha then the index of ζ \zeta in either p + i b p+ib or p i b p-ib must be 3 α 3\alpha , a multiple of 3 3 . Thus we deduce that p + i b p+ib must be a product of cubes of irreducible factors of Z [ i ] \mathbb{Z}[i] , none of which are integers, and hence we deduce that p + i b = ( x + i y ) 3 p + ib \; = \; (x + iy)^3 for some integers x , y x,y . This tells us that a = x 2 + y 2 b = 3 x 2 y y 3 p = x 3 3 x y 2 = x ( x 2 3 y 2 ) \begin{array}{rcl} a & = & x^2 + y^2 \\ b & = & 3x^2y - y^3 \\ p & = & x^3 - 3xy^2 \; = \; x(x^2 - 3y^2) \end{array} There are now four possibilities for x x :

  1. If x = p x=p , then 1 = p 2 3 y 2 1 = p^2 - 3y^2 , and hence y 2 = 1 3 ( p 2 1 ) y^2 \,=\, \tfrac13(p^2-1) . There are only three primes less than 300 300 which have this property, and we have the following table of corresponding values: p x y a b 2 2 1 5 11 7 7 4 65 524 97 97 56 12545 1405096 \begin{array}{|c|c|c|c|c|} \hline p & x & y & a & b \\ \hline 2 & 2 & 1 & 5 & 11 \\ 7 & 7 & 4 & 65 & 524 \\ 97 & 97 & 56 & 12545 & 1405096 \\ \hline \end{array} and a a and b b are coprime in all three cases.

  2. If x = 1 x=1 , then p = 1 3 y 2 p = 1 - 3y^2 , and hence y 2 = 1 3 ( 1 p ) < 0 y^2 \,=\, \tfrac13(1-p) \,<\, 0 , which is not possible.

  3. If x = 1 x=-1 , then p = 1 3 y 2 -p =1 - 3y^2 , and hence y 2 = 1 3 ( 1 + p ) y^2 \,=\, \tfrac13(1+p) . There are five primes less than 300 300 which have this property, and we have the following table of corresponding values: p x y a b 2 1 1 2 2 11 1 2 5 2 47 1 4 17 52 107 1 6 37 198 191 1 8 65 488 \begin{array}{|c|c|c|c|c|} \hline p & x & y & a & b \\ \hline 2 & -1 & 1 & 2 & 2 \\ 11 & -1 & 2 & 5 & -2 \\ 47 & -1 & 4 & 17 & -52 \\ 107 & -1 & 6 & 37 & -198 \\ 191 & -1 & 8 & 65 & -488 \\ \hline \end{array} and a a and b b are coprime in all but the first case. Happily, the prime 2 2 has already qualified.

  4. If x = p x=-p , then 1 = p 2 3 y 2 -1 = p^2 - 3y^2 , and hence y 2 = 1 3 ( p 2 + 1 ) y^2 \,=\, \tfrac13(p^2+1) . But n 2 + 1 n^2+1 is never a multiple of 3 3 .

Thus there are 7 7 primes less than 300 300 for which this decomposition can be made: 2 , 7 , 97 , 11 , 47 , 107 , 191 2,7,97,11,47,107,191 . Their sum is 462 462 .

The main trick is to rewrite the identity p 2 = a 3 b 2 p^2 = a^3 - b^2 in the form a 3 = p 2 + b 2 a^3 = p^2 + b^2 . The sum of squares then should remind you of the Gaussian integers!

So neat!

Arkan Megraoui - 7 years, 6 months ago

This problem drove me nuts because I missed the prime 97 97 (otherwise my solution was identical to yours). I argued as follows, if 3 y 2 = p 2 1 = ( p + 1 ) ( p 1 ) 3y^2 = p^2 - 1 = (p+1)(p-1) and some q 2 y 2 q^2 | y^2 then q p + 1 q | p+1 and q p 1 q | p-1 hence q 2 p q | 2p , so q = 2 q = 2 which gives us p = 7 p=7 . Of course, the above is not quite true because it can happen that q 2 q^2 divides only p + 1 p+1 or p 1 p-1 but not both. So it is with 97 97 where we have 98 = 7 2 2 98 = 7^2 \cdot 2 , 96 = 3 2 5 96 = 3 \cdot 2^5 .

Marek Bernat - 7 years, 6 months ago
Patrick Corn
Nov 25, 2013

First, 2 2 = 5 3 1 1 2 . 2^2 = 5^3 - 11^2. Henceforth, we can assume p p is odd. By looking mod 4 4 , we can see that in this case, b b is even and a a is odd.

Write ( p + b i ) ( p b i ) = a 3 (p+bi)(p-bi) = a^3 . Note that p + b i p+bi and p b i p - bi are relatively prime in the Gaussian integers (this makes sense since the Gaussian integers are a Euclidean domain): any common divisor divides their sum and difference, hence 2 p 2p and 2 b 2b , but p b p|b is impossible because then p a p|a , contradicting coprimality; so any common divisor divides 2 2 , but p + b i p+bi has odd norm and norms are multiplicative, so nothing with even norm can divide it.

When the product of two relatively prime elements is a cube, they must both be unit multiples of cubes; but all the units are cubes themselves, so p + b i p+bi and p b i p-bi are cubes. Write p + b i = ( x + y i ) 3 . p+bi = (x+yi)^3. (Note that this will imply p b i = ( x y i ) 3 p-bi = (x-yi)^3 and hence a = ( x 2 + y 2 ) a = (x^2+y^2) . Equating real and imaginary parts gives p = x ( x 2 3 y 2 ) . p = x(x^2-3y^2). There are two cases: x = ± 1 x = \pm 1 , x = ± p x = \pm p .

If x = ± 1 x = \pm 1 , we get 1 3 y 2 = ± p . 1-3y^2 = \pm p. Clearly this must be p -p , hence p = 3 y 2 1 p = 3y^2 -1 . Note that y y must be even to give odd p p . Looking at even values of y 10 y \le 10 gives p = 11 , 47 , 107 , 191 , 299 p = 11, 47, 107, 191, 299 ; but 299 299 is not prime, so we're left with 11 , 47 , 107 , 191. 11, 47, 107, 191.

If x = ± p x = \pm p , we get p 2 3 y 2 = ± 1. p^2 - 3y^2 = \pm 1. Looking mod 3 3 we must have p 2 3 y 2 = 1 p^2 - 3y^2 = 1 . The positive solutions to this Pell equation can be enumerated in any number of ways, for instance by starting with a 1 = 2 , b 1 = 1 a_1 = 2, b_1 = 1 and then using the recursive formulas a n + 1 = 2 a n + 3 b n , b n + 1 = a n + 2 b n . a_{n+1} = 2a_n + 3b_n, b_{n+1} = a_n + 2b_n. This gives ( 2 , 1 ) , ( 7 , 4 ) , ( 26 , 15 ) , ( 97 , 56 ) , ( 362 , 209 ) , (2,1), (7,4), (26,15), (97,56), (362,209), \ldots , from which we take the viable solutions 7 , 97 7, 97 .

It is not hard to go through each of the equations once x x and y y are determined, to solve for a a and b b , to check that each of these yield solutions.

Summing up, we get 2 + 11 + 47 + 107 + 191 + 7 + 97 = 462 2 + 11 + 47 + 107 + 191 + 7 + 97 = \fbox{462} .

The technique here is reminiscent of ones that modern mathematicians use to solve Fermat's famous challenge problems. Here is a nice reference (see section 1.2): http://www.maa.org/sites/default/files/pdf/upload_library/22/Ford/Everest-2012.pdf

Patrick Corn - 7 years, 6 months ago

Log in to reply

Nice reference, thank you! Of course, compared to the modern (and not-so-modern) arithmetic geometry, this problem is just a toy case :)

Alexander Borisov - 7 years, 6 months ago
David Lin Kewei
May 20, 2014

[Note: The case p = 2 p=2 is dealt with seperately. Do you see where in this prove we need p 2 p\neq 2 ? - Calvin] (Some high-power tools are involved) We have a 3 = p 2 + b 2 a^3 = p^2 + b^2 . It is easy to note that p,a,b must be pairwise coprime (otherwise, if p divides a or b, then it must divide the other). Factoring in Z [ i ] \mathbb{Z}[i] , we have that a 3 = ( p + b i ) ( p b i ) a^3 = (p+bi)(p-bi) . However, gcd ( p + b i , p b i ) = gcd ( p + b i , 2 b i ) = gcd ( p + b i , b i ) \gcd(p+bi,p-bi) = \gcd(p+bi, 2bi) = \gcd(p+bi, bi) , since 2 doesn't divide p + b i p+bi as p , b p,b are coprime). This is thus equal to gcd ( p , b i ) = 1. \gcd(p, bi) = 1. Thus we have that for some k = x + i y k=x+iy , k 3 = p + b i k^3 = p+bi , k 3 = p b i \overline{k} ^3 = p-bi .

Now we expand the first equation: p + b i = ( x + i y ) 3 = x ( x 2 3 y 2 ) + i y ( 3 x 2 y 2 ) p+bi = (x+iy)^3 = x(x^2-3y^2) + iy(3x^2 - y^2) Thus p = x ( x 2 3 y 2 ) p = x(x^2-3y^2) . This implies x = 1 x=1 or -1, or that x 2 3 y 2 = 1 x^2 - 3y^2 = 1 or -1. We have the following cases

If x = 1 x = 1 , then p = 1 3 y 2 < 2 p = 1-3y^2 < 2 , contradiction

If x = 1 x = -1 , then p = 3 y 2 1 p = 3y^2 - 1 . We may now list a few such values to obtain ( y , p ) = ( 1 , 2 ) ( 2 , 11 ) ( 4 , 47 ) ( 6 , 107 ) ( 8 , 191 ) (y,p) = (1,2) (2,11) (4,47) (6,107) (8,191) However, taking ( y , p ) = 1 , 2 (y,p) = 1,2 will not give coprime values of p p and b b since b = 2 b = 2 . It is simple to verify that the other solutions are valid.

If x 2 3 y 2 = 1 x^2-3y^2 = -1 , we note that there are no integer solutions by taking mod 4, which is equivalent to x 2 + y 2 1 ( m o d 4 ) x^2 + y^2 \equiv -1 \pmod{4} . Of course, we know that x 2 + y 2 x^2 +y^2 can only be congruent to 0,1,2 mod 4.

If x 2 3 y 2 = 1 x^2 - 3y^2 = 1 , then we have a Pell's equation (,as well as p = x p = x ). The fundamental solution is x = 2 , y = 1 x=2, y=1 . Then, we expand ( 2 + 3 ) n (2+\sqrt{3})^n to get solutions: ( x , y ) = ( 2 , 1 ) ( 7 , 4 ) , ( 97 , 56 ) (x,y) = (2,1) (7,4), (97, 56)

This gives us the last three solutions, and we may easily check that these solutions are also valid. Thus 2 + 7 + 11 + 47 + 97 + 107 + 191 = 462. 2+7+11+47+97+107+191 = 462.

This solution uses basic ideas of Gaussian Integers and Pell's Equation.

If coprimality condition is dropped, it may happen that both a a and b b are divisible by p p , for example 5 2 = 5 3 1 0 2 5^2=5^3-10^2 , and this becomes harder to deal with.

Calvin Lin Staff - 7 years ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...