We rewrite the equation as follows.
n3=p3+2p2q+2pq2+q3=(p+q)(p2+pq+q2)
Clearly, p=q, because, otherwise, the equation n3=6p3 would hold, which is not possible for positive integers.
Suppose there exists such s>1, which is a factor of both p+q and (p2+pq+q2). But then s∣(p+q)2−(p2+pq+q2)=pq. If, for example, s∣p, then from s∣(p+q) follows s∣q⇒ from p,q being prime, it must be that p=q, which leads to contradiction.
If, on the other hand, ((p+q),(p2+pq+q2))=1, then each factor must be a cube of a positive integer. Suppose p+q=x3, p2+pq+q2=y3, and n=xy. Then,
pq=(p+q)2−(p2+pq+q2)=x6−y3=(x2−y)(x4+x2y+y2).
Since x4+x2y+y2>x3=p+q, we obtain x4+x2y+y2=pq and x2−y=1⇒pq=x4+x2(x2−1)+(x2−1)2=3x4−3x2+1=3x2(x−1)(x+1)+1≡1(mod9), since x(x−1)(x+1)≡3(mod9).
What is left is to search through the cases modulo 9. Cube of an integer modulo 9 can be equal to 0, \pm 1. Let us list all possible cases for remainders modulo 9 of primes p,q so that condition pq≡1(mod9) is satisfied.
p≡1(mod9)⇒q≡1(mod9)⇒x3=p+q≡2(mod9){ – contradiction.}
p≡2(mod9)⇒q≡5(mod9)⇒x3=p+q≡7(mod9){ – contradiction.}
p≡4(mod9)⇒q≡7(mod9)⇒x3=p+q≡2(mod9){ – contradiction.}
p≡8(mod9)⇒q≡8(mod9)⇒x3=p+q≡7(mod9){ – contradiction.}
All the cases were checked, which concludes the proof that such numbers do not exist.