Let pn be the largest prime divisor of n4+n2+1, and let qn be the largest prime divisor of n2+n+1.
It is easy to see that pn=qn2. Also, from
n4+n2+1=(n2+1)2−n2=(n2−n+1)(n2+n+1)=((n−1)2+(n−1)+1)(n2+n+1)
we know that for all n≥2, pn=max{qn,qn−1}. Also since n2−n+1 is odd,
gcd((n−1)2+(n−1)+1,n2+n+1)=gcd(2n,n2−n+1)=gcd(n,n2−n+1)=1.
Hence qn=qn−1.
Returning to the original problem. Consider the set
S:={n∈Z≥2∣qn>qn−1,qn>qn+1}.
Note that for all n∈S, we have
pn=max{qn,qn−1}=qn=max{qn,qn+1}=pn+1,
so the original problem is equivalent to proving that S has infinitely many elements. Here note that q2=7<13=q3 and q3=13>7=q4, so S is nonempty.
We now argue by contradiction: suppose S has a largest element m. Since all qi are positive integers, it is impossible that qm>qm+1>qm+2>…, so there must exist k≥m such that qk<qk+1 (note that it has already been shown that qk=qk+1). Also, note that since q(k+1)2=pk+1=max{qk,qk+1}=qk+1, it is likewise impossible that qk<qk+1<…, so there must exist a smallest l≥k+1 such that ql>ql+1.
But since l is smallest, we must have ql>ql−1, and hence l∈S, contradicting the assumption that m is the largest element. Contradiction! Therefore S has infinitely many elements. This completes the proof.