Primes $p$ and $q$ such that $p^3+27pq^2-q^3=2017$

1.1k Views Asked by At

Find all primes $p$ and $q$ such that $$p^3 + 27pq^2 - q^3 = 2017.$$

I tried using mod $3$ to solve this, however I kept going in circles. I also tried using inequalities, but couldn't come up with a solution.

Any ideas?

1

There are 1 best solutions below

0
On BEST ANSWER

After reducing modulo $27$ we obtain $p^3-q^3 \equiv 19 \pmod{27}$ Using the fact that the only cubes modulo $27$ of elements not divisible by $3$ are 1,8,10,17,19,26, we see that $p^3 - q^3 \equiv 19 \pmod{27}$ has no solutions when both $p$ and $q$ are coprime to $3$, thus either $p=3$ or $q=3$.

Suppose $p=3$, then after plugging in and rearranging, we obtain $q^2\cdot(81-q) = 1990$ But note that the RHS $1990=2\cdot5\cdot199$ is square-free, so this is impossible, thus we must have $q=3$.

So after plugging in and rearraging we obtain $p^3+243p=2044$. By trial and error, we find that $p = 7$ is a solution. As the function $f(x) = x^3+243x$ has a strictly positive derivative $x$, it is strictly monotonously increasing, so we find that this is in fact the only solution.

So the only solution is $p=7, q=3$