TITLE: Is it true that $p^{12}+5039\cdot5041$ always has a prime factor greater than $7$?
QUESTION [8 upvotes]: We can prove that if $p>7$ is a prime then $2^4\cdot3^2\cdot5\cdot7\mid p^{12}+5039\cdot5041.$
Is it true that $p^{12}+5039\cdot5041$ always has a prime factor greater than $7$?
I have checked it for $p<10^4,$ but I don't know how to prove it.

REPLY [3 votes]: Let $S$ be any finite set of primes and $S^*$ be the set of integers divisible only by primes in $S$.  For any fixed $c\ne 0$, there are only finitely many $n$ such that $n^3 + c \in S^*$.
For an elementary way to see this, notice that any such $n$ solves a particular Thue equation $Am^3 - n^3=c$ where $A$ can be restricted one of the $3^{|S|}$ cubefree numbers in $S^*$.  (Technically, the case $A=1$ is not an irreducible form but it is very straightforward since the sequence of cubes grows sparsely.)
So if there are any counterexamples, there are only finitely many, even if we don't require that $n=p^4$.  Heuristically I wouldn't expect any more once you've checked up to $p<10^4$.  In theory, one can provably compute all exceptions (Pari/GP is free software which, I believe, can solve Thue equations), but I've no idea how practical such a computation is, and the Pari site appears to be down at the moment.