# If $n^4\equiv1\mod p$ and $n^{12}\equiv1\mod p$, then $n^3+n\equiv0\mod p$

If $n^4\equiv1\mod p$ and $n^{12}\equiv1\mod p$, then $n^3+n\equiv0\mod p$

where $(n,p)=1$ and $4$ is the smallest integer s.t. $n^4\equiv1$

By trial $(n^3+n)^2=x^6+2 x^4+x^2\equiv-1+2-1\mod p\equiv0\mod p$

Can I conclude from there the claim ?

• Suppose $n=1$.... – lulu Sep 10 '16 at 13:12
• @lulu but then $4$ is not the smallest integer, i.e. the exponent of $n$ – user257 Sep 10 '16 at 13:13
• @lulu Yes, it is obvious, I just want to say that $n$ and $n^3$ are inverses of each other. Factoring gives $(n-1) (n+1) (n^2+1)$, and ? – user257 Sep 10 '16 at 13:18
• This means that $p$ divides $\left(n^3+n\right)^2$, so it also divides $n^3+n$. – Guy Sep 10 '16 at 13:18
• Just remark that $n^2+1\equiv 0$ and that your assumptions imply that $(n^3+n) +(n^2+1)\equiv 0$. – lulu Sep 10 '16 at 13:19

If $p$ is prime, this is easy:
$n^4-1\equiv (n^2+1)(n^2-1) \equiv 0 \bmod p$.
But we are told that $n^2 \not\equiv 1 \bmod p$. So $n^2+1 \equiv 0 \bmod p$ (because $p$ is prime). Now just multiply by $n$.
And if $p$ is not prime, the statement is false: take for instance $p=15, n=2$.
BTW, why did you tell us that $n^{12}\equiv 1 \bmod p$? We already knew that!
$$1^4\equiv 1^{12}\equiv 1 \pmod p$$ and $$1^3+1\equiv 2\pmod p$$ This is valid only for $p=2$ where $2\equiv 0\pmod 2$