Problem: For integral $m$, let $p(m)$ be the greatest prime divisor of $m$.
By convention, we set $p(\pm 1) = 1$ and $p(0) = \infty$.
Find all polynomials $f$ with integer coefficients
such that the sequence
\[ \{ p(f(n^2)) - 2n \}_{n \geq 0}  \]
is bounded above.
(In particular, this requires $f(n^2) \neq 0$ for $n \ge 0$.)

Solution: If $f$ is the (possibly empty)
product of linear factors of the form $4n-a^2$,
then it satisfies the condition.
We will prove no other polynomials work.
In what follows, assume $f$ is irreducible and nonconstant.

It suffices to show for every positive integer $c$,
there exists a prime $p$ and a nonnegative integer $n$
such that $n \le \tfrac{p-1}{2} - c$ and $p$ divides $f(n^2)$.

Firstly, recall there are infinitely many odd primes $p$,
with $p>c$, such that $p$ divides some $f(n^2)$, by Schur's Theorem.
Looking mod such a $p$ we can find $n$ between $0$
and $\tfrac{p-1}{2}$ (since $n^2 \equiv (-n)^2 \pmod p$).
We claim that only finitely many $p$ from this set can fail now.
For if a $p$ fails, then its $n$ must be between
$\tfrac{p-1}{2} - c$ and $\tfrac{p-1}{2}$.
That means for some $0 \le k \le c$ we have
\[ 0 \equiv f\left( \left(\frac{p-1}{2}-k\right)^2 \right)
  \equiv f\left( \left( k + \frac12 \right)^2 \right) \pmod{p}. \]
There are only finitely many $p$ dividing
\[ \prod_{k=1}^c f\left( \left( k+\frac12 \right)^2 \right) \]
unless one of the terms in the product is zero;
this means that $4n-(2k+1)^2$ divides $f(n)$.
This establishes the claim and finishes the problem.