Say p and q both >3. Then each = 1 or -1 mod6. But when p=q mod6, LHS=0 mod6 and RHS<>0 mod6, and if p<>q mod6 the opposite occurs.
By inspection, p<>2 and <>3 as otherwise LHS<=0, so any solution requires q=2 or q=3.
In the first case, p^3-32=(p+2)^2. Rewrite as p^3+8-(p+2)^2=40 and (p+2) factors 40 where p is prime. No solution appears.
Similarly, in the second case p^3+27-(p+3)^2=270 and only p=7 satisfies conditions.
7^3-3^5 = 343-243 = 100 = (7+3)^2.
|
Posted by xdog
on 2023-10-08 11:40:15 |