Show that there are infinite values of $n$ such that the biggest prime divisor of $n^4+n^2+1$ equals the biggest prime divisor of $(n+1)^4+(n+1)^2+1$.

  • 2
    $\begingroup$ They both have a factor $n^2+n+1$. If that is prime and $n^2+3n+3$ is not you have a case. $\endgroup$ Jun 7, 2017 at 14:45
  • $\begingroup$ @RossMillikan taking $n=3m$ will make sure that $n^2+3n+3$ is composite and $n^2+n+1$ could be prime(i think infinitely many times). $\endgroup$
    – Ahmad
    Jun 7, 2017 at 15:12
  • $\begingroup$ ${n^2 + n + 1}$ has inf prime ... ? $\endgroup$
    – Mudream
    Jun 7, 2017 at 15:30
  • 1
    $\begingroup$ @Ahmad: Yes if $n=3m$ you know $9m^2+9m+3$ is composite. I don't know how to justify that $9m^2+3m+1$ is prime infinitely often or I would have answered. $\endgroup$ Jun 7, 2017 at 15:42

1 Answer 1


As Ross Millikan commented, both terms contain a factor $n^2+n+1.$ What we also note is that in fact $n^4+n^2+1 = (n^2+n+1)((n-1)^2+(n-1)+1).$ This motivates definining $$ f(n) = n^2+n+1, $$ and we see that \begin{align} f(n^2) = f(n)f(n-1). \tag{1} \end{align} If $g(n)$ is the largest prime divisor of $f(n),$ we are reduced to showing that $g(n)$ is never monotonous for $n > N$ for any constant $N.$ This is because the condition in the problem statement is equivalent to $g(n)$ having a local maximum. But this is clear because of (1), which implies that $g(n^2) = \min{(g(n),g(n-1))},$ so if $g$ is monotonous for sufficiently large $n,$ it must be constant for sufficiently large $n,$ which is easily seen to be impossible (for example if it takes on the value $p,$ we have $n^2+n+1 = 0 \pmod p,$ which can only have at most two solutions $\pmod p.$)


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .