TITLE: Prove that there exist infinitely many integers $(n^{2015}+1)\mid n!$
QUESTION [38 upvotes]: I conjecture that there exist infinitely many integers $n$ such
  that $$(n^{2015}+1)\mid n!.$$

I have seen a simpler problem that there exist infinitely many integers $n$ such that $(n^2+1)\mid n!$.
Alternatively, I considered the Pell equation
$n^2+1=5m^2$, $2m<n$, but for $2015$ I can't figure it out.

REPLY [13 votes]: It suffices to show that for infinitely many $n$, the largest prime factor of $n^{2015}+1$ is at most $\sqrt{n}$. Indeed, if $n$ is such a large integer and $p$ is a prime, then the largest value of $a$ for which $p^a\mid n^{2015}+1$ is $\leq c \log n$ for some constant $c$, while $n!$ is divisible by $p^a$ with $a\geq \frac{n}{p}-1\geq \sqrt{n}-1>c \log n$. It was shown by Schinzel (Theorem 13 in https://eudml.org/doc/204826) that for any nonzero integers $A$ and $B$, any integer $k\geq 2$ and any $\varepsilon>0$ there exist infinitely many integers $n$ such that the largest prime factor of $An^k+B$ is less than $n^{\varepsilon}$. In particular, the claim of the problem holds with $2015$ replaced by any positive integer.