## If prime p = x^3 – y^3, then p = a^2 + 3*b^2

Show that any prime which is the difference of two cubes is also the sum of a square and three times a square.

Solution :

$p \; = \; x^3 \; - \; y^3 \; = \; (x - y) \,(x^2 + x \,y + y^2)$

Since   $x$   and   $y$   are positive integers,
the only way this can happen is if   $x - y = 1$

Either   $x$   or   $y$   is even.
If   $x$   is even,   let   $x = 2 \,u$,   so   $y = 2 \,u - 1$

Then

$p \; = \; (2 \,u)^2 \; + \; (2 \,u) \,((2 \,u - 1) \; + \; (2 \,u - 1)^2$
$p \; = \; 12 \,u^2 \; - \; 6 \,u \; + \; 1$
$p \; = \; (3 \,u - 1)^2 \; + \; 3 \,u^2$

has the desired form.

If   $y$   is even,   let   $y = 2 \,u$,   so   $x = 2 \,u + 1$

Then

$p \; = \; (2 \,u + 1)^2 \; + \; (2 \,u) \,(2 \,u + 1) \; + \; (2 \,u)^2$
$p \; = \; 12 \,u^2 \; + \; 6 \,u \; + \; 1$
$p \; = \; (3 \,u + 1)^2 \; + \; 3 \,u^2$

has the desired form.

math grad - Interest: Number theory
This entry was posted in Prime Numbers and tagged . Bookmark the permalink.

### 2 Responses to If prime p = x^3 – y^3, then p = a^2 + 3*b^2

1. paul says:

There are actually more instances when the difference isn’t a prime, however there does seem to be only one solution for {a and b} when the difference is a prime. I’m thinking that’s a special case of a more general solution.

Here are solutions between those limits above with the other instances, the format is
{x, y, {a, b, a, b, a, b…},diff(x-y), Prime or not}

{2,1,{2,1},7,True}
{3,2,{4,1},19,True}
{4,1,{6,3},63,False}
{4,3,{5,2},37,True}
{5,1,{4,6,7,5,11,1},124,False}
{5,2,{3,6},117,False}
{5,4,{7,2},61,True}
{6,2,{4,8,10,6,14,2},208,False}
{6,3,{9,6},189,False}
{6,5,{4,5,8,3},91,False}
{7,3,{4,10,13,7,17,3},316,False}
{7,4,{6,9},279,False}
{7,6,{10,3},127,True}
{8,1,{2,13,22,3},511,False}
{8,4,{4,12,16,8,20,4},448,False}
{8,5,{12,9},387,False}
{8,7,{11,4},169,False}
{9,2,{17,12,23,8},721,False}
{9,5,{4,14,19,9,23,5},604,False}
{9,6,{9,12},513,False}
{9,8,{5,8,13,4},217,False}
{10,1,{18,15},999,False}
{10,3,{1,18,31,2},973,False}
{10,6,{4,16,14,14,22,10,26,6},784,False}
{10,7,{15,12},657,False}
{10,9,{14,5},271,True}

Paul.