# Number theory: Prime powers and cubes

Determine all triples $(p,a,b)$ of positive integers, where $p$ is prime and $a \leq b$ such that $$p^a+p^b$$ is a perfect cube.

I came across this question while looking at past maths Olympiad papers in my country. It has been frustrating me for a while. The only progress I've made is the following -

Let $p^a+p^b=k^3$.

Then $p^a(1+p^{b-a})=k^3$, but unless $p=2,a=b$, $\gcd(p^a,p^{b-a}+1)=1$.

Case 1: $b=a$, $p=2$.

Then $k^3=2^a+2^a=2^{a+1}$, so $a \equiv 2 \pmod3$. Hence $(2,a,a)$ is a solution $\forall \; \; a \equiv 2 \pmod3$.

Case 2: Case 1 is not true.

Then as $\gcd(p^a,p^{b-a}+1)=1$, $p^a$ and $1+p^{b-a}$ must both be cube and hence $3|a$.

Let $a=3m$,

I can't seem to get beyond this point although I did try ignoring the $p^a$ and focusing on making the other term a cube. I did some factorizing but it didn't help (as far as I could see).

Thanks in advance for any help.

-
Is it just me or does this look like a specialized version of fermat's last theorem? – Snakes and Coffee May 7 '13 at 6:02

You took care of the case $a=b$, and obtained the infinite family of solutions $2^{3k+2}+2{3k+2}$.

So assume that $a\lt b$. You showed that for $p^a(1+p^{b-a})$ a cube, $a$ should be divisible by $3$, and $1+p^c$ should be a cube, where $c=b-a$. We com[lete things from there.

If $b-a=1$, we want $1+p$ to be a cube, say $x^3$. The factorization $x^3-1=(x-1)(x^2+x+1)$ tells us that the only possibility is $x=2$, giving $p=7$.

This generates an infinite number of variants, namely $$7^{3k}+7^{3k+1}.$$

So now we look at the case $1+p^c$ a cube, where $c\gt 1$. As Ross Millikan points out, there is no solution, by Mihailescu's Theorem. But let's see whether we can prove it without heavyweight machinery.

Suppose $p^c=x^3-1=(x-1)(x^2+x+1)$. Thus each of $x-1$ and $x^2+x+1$ is a power of $p$. Except in the trivial case $x=2$, $p$ must divide each of $x-1$ and $x^2+x+1$. Any common divisor of these must divide $(x^2+x+1)-(x-1)^2$, so it divides $3x$, and therefore $3$.

So we must have $p=3$. Moreover, since each of $x-1$ and $x^2+x+1$ is a proper power of $3$, the only remaining possibility is $x-1=3$. This doesn't work.

-
I haven't quite taken care of $a=b$, but I think I could reasonably easily. – John Marty May 7 '13 at 4:30
Sure you have. If $a=b$, then $p^a+p^b=2p^a$. If this is a cube we need $p=2$. – André Nicolas May 7 '13 at 4:37
Yeah, I see. Thanks so much for giving me a solution without using any "heavyweight machinery". – John Marty May 7 '13 at 4:39

If $p^a$ is a cube, so must $p^{b-a}+1$, so you can just ignore $p^a$, let $b-a=c$ and search for $1+p^c$ being a cube. But Catalan's conjecture, proved by Preda Mihăilescu in April 2002, says this does not happen, so you are done unless $c=1$.

-
Thus one is left to ponder what if $p^a$ is not a cube, while $p^a+p^b$ is. – awllower May 7 '13 at 4:01
@awllower: OP showed it was, unless $p=2$. I missed it could be $1$ – Ross Millikan May 7 '13 at 4:45

Hint: Taking $\mod 8$ for all $a,b \in$ Even numbers would dismiss half of the natural numbers.

$p , q \neq 2$

$p^{2k} \equiv 1 (\mod 8)$

$q^{2t} \equiv 1 (\mod 8)$

$p^{2k}+q^{2t} \equiv 2 (\mod 8)$. But cubes are $1$ or $0 (\mod 8)$

-
Thanks so much, that is a really neat approach! – John Marty May 7 '13 at 4:40
Still half the natural numbers are left. Sir Andre Nicolas' way is much better. – Inceptio May 7 '13 at 4:43