# When is $n^{2015}+n+1$ prime?

$n \in \mathbb{N}$.

I think this seems true only for $1$.

I tried to show that $4n-1,2n+1,2^{n+1}-1$ divides the given expression but didn't succeed. I have only thought about this through the way of modular arithmetic. Someone suggested to me to use the complex roots of this equation, but didn't specify how. Are there any other results I can use for this problem(I may not know them)?

Please provide only hints if you do solve it. Thank you.

\begin{eqnarray*} n^{2015} +n+1 &=& n^{2015} -n^2+n^2+n+1 \\ &=& n^2(n^{2013} -1) + n^2+n+1 \\ &=& n^2(n^3-1)\underbrace{(n^{2010}+n^{2007}+...+n^3+1)}_a +n^2+n+1 \\ &=& (n^2+n+1)(an^2(n-1)+1) \\ &=& \end{eqnarray*} Since $n^2+n+1\geq 3$ this could be prime only if $an^2(n-1)+1 =1$ and this is only when $n=1$.

• This would be a good contest-math Q at some level of competition. – DanielWainfleet Jan 5 at 1:05

$2015\equiv 2\pmod{3}$ implies that $\Phi_3(n)=n^2+n+1$ is a divisor of $n^{2015}+n+1$, so...

• What is that function? – Adienl Aug 10 '17 at 15:54
• @Adienl: the standard notation for cyclotomic polynomials: en.wikipedia.org/wiki/Cyclotomic_polynomial – Jack D'Aurizio Aug 10 '17 at 15:57
• Hi. I do not understand. Why does $2015\equiv 2\pmod{3}$ imply that $\Phi_3(n)=n^2+n+1$ is a divisor of $n^{2015}+n+1$?! – stressed out Jul 13 '18 at 8:02
• Because n raised to the 2015th power is congruent to n^2 mod n^3-1, hence n^2015 is congruent to n^2 mod n^2+n+1 too, since the last polynomial is a divisor of n^3-1. – Jack D'Aurizio Jul 13 '18 at 9:07