Find all primes $p,q,r$ such that $7p^3-q^3=r^6$.
Proposed by Titu Andreescu.
Solution:
Suppose that $r=2$. Then, $7p^3=(q+4)(q^2-4q+16)$. Observe that both $p$ and $q$ are odd primes. Since $$q^2-4q+16=(q+4)(q-8)+48,$$ $\gcd(q+4,q^2-4q+16)|48$. Moreover, both factors are odd numbers, so $\gcd(q+4,q^2-4q+16) \in \{1,3\}$. If $\gcd(q+4,q^2-4q+16)=3$, then $p=3$ by Unique Factorization. Substituting these values into the original equation we get $q=5$. If $\gcd(q+4,q^2-4q+16)=1$, since both factors are greater than $1$, we get $p \neq 7$ and $$\begin{array}{rcl} q+4&=&7 \\ q^2-4q+16&=&p^3 \end{array} \qquad \begin{array}{rcl} q+4&=&p^3 \\ q^2-4q+16&=&7. \end{array}$$ It's easy to see that both systems of equations have no solution. Now, suppose that $r>2$. Then, exactly one between $p$ and $q$ is $2$ and the other is odd. Suppose that $p=2$. Then, $$56=(q+r^2)(q^2-qr^2+r^4).$$ Moreover both factors are greater than $1$, $q+r^2$ is even and $q^2-qr^2+r^4$ is odd, so the only possibility is $$\begin{array}{rcl} q+r^2&=&8 \\ q^2-qr^2+r^4&=&7 \end{array}$$ and clearly the first equation has no solution in odd primes. Now, suppose that $q=2$. Then, $$7p^3=(r^2+2)(r^4-2r^2+4).$$ Since
$$r^4-2r^2+4=(r^2+2)(r^2-4)+12,$$ then $\gcd(r^2+2,r^4-2r^2+4)|12$, but both factors are odd, so $\gcd(r^2+2,r^4-2r^2+4) \in \{1,3\}$. If $\gcd(r^2+2,r^4-2r^2+4)=3$, then $p=3$ by Unique Factorization, but there is no solution for $p=3,q=2$. If $\gcd(r^2+2,r^4-2r^2+4)=1$, since both factors are greater than $1$, we get $p \neq 7$ and $$\begin{array}{rcl} r^2+2&=&7 \\ r^4-2r^2+4&=&p^3 \end{array} \qquad \begin{array}{rcl} r^2+2&=&p^3 \\ r^4-2r^2+4&=&7. \end{array}$$ It's easy to see that both systems of equations have no solution. Therefore, the only primes which satisfy the given equation are $p=3,q=5,r=2$.