Determine all pairs $(p,q)$ of primes for which both $p^2+q^3$ and $q^2+p^3$ are perfect squares.
Problem
Source: Baltic Way 2011
Tags: number theory proposed, number theory
06.11.2011 16:07
Hmmm ... $p=q=2$ is not working, since $4+8 = 12 \neq \square$. If wlog $p=2$, $q>2$, then $q^3 = x^2 - 4 = (x-2)(x+2)$, with clearly $\gcd(x-2,x+2)=1$ (since $x$ odd). But then we need $x-2=1$, so $q^3 = 5$, absurd. So both $p,q$ are odd, and then $\gcd(x-p,x+p)=1$ or $p$. If the former, then we need $x-p=1$, so $q^3 = 2p+1$, and similarly $p^3 = 2q+1$, but wlog $p\leq q$, so $q^3 \leq 2q+1$, impossible. If the latter, then $q=p$ and $x=kp$, and so $p^3 = p^2(k-1)(k+1)$, hence $k=2$ and so $\boxed{p=q=3}$, and indeed $9+27 = 36=6^2$.
06.11.2011 16:47
If $p = q$, then $p + 1 = {x^2}$, so $p = (x - 1)(x + 1) \Rightarrow x - 1 = 1$, and $p = 3$. If $p \ne q$, we can suppose$p < q$, so $q \geqslant 3$, ${p^2} + {q^3} = {a^2} \Rightarrow {q^3} = (a - p)(a + p)$, $(a - p,a + p) = (a + p,2p)$, $(2p,q) = 1$, so we have $a - p = 1$, $a + p = {q^3}$, hence $2p = {q^3} - 1 = (q - 1)({q^2} + q + 1) > 2q$, contradiction. So $(p,q) = (3,3)$ is the only solution.
17.10.2015 08:19
We can get following equation. p^2+q^3=m^2(m∈N) ∴(m+p)(m-p)=q^3 So (m+p,m-p)=(q^3,1)---①,(q^2,q)---② Case ①:q^3-p=1+p⇔2p=q^3-1 ∴q is odd and p=(q-1)/2・(q^2+q+1).So (q-1)/2=1⇔q=3, and p=13.But 3^2+13^3=2206=2・1103 is not perfect square.This is contradiction. Case②:q^2-p=q+p⇔p=q(q-1)/2 q≧3 since p≧2.So (q-1)/2=1⇔q=3 and p=3.We can easily confirmed p=q=3 is satisfied the conditions. By Case①,② the answer is (p,q)=(3,3).
28.09.2022 19:53
Here is a funny alternative argument for the case $p \ne q$ where $p,q$ are odd: Clearly, the two conditions imply that $p$ is a quadratic residue modulo $q$ and $q$ is a quadratic residue modulo $p$. By quadratic reciprocity, this implies that at least one of $p,q$ is $1 \pmod{4}$. On the other hand, a consideration modulo $4$ shows immediately that $p,q \equiv 3 \pmod{4}$. Done.