2

Does $x^n+1 \equiv 0 \pmod{n}$ imply $\text{gcd}(x+1,n)>1$?

My feeling is that it shouldn't be too hard to prove, but I just can't figure it out. For $n$ prime it is clear since $x^n \equiv x \pmod{n}$ in that case.

hardmath
  • 37,015
Pjotr5
  • 2,187
  • 1
  • 13
  • 17

1 Answers1

1

This is quite a nice question and the answer to it is yes. Firstly, notice that if $n$ is even than $x$ should be odd. So $gcd(x+1,p)=2>1$ Let's take the case when $n$ is odd. Consider the canonical representation of the integer $$n=p_1^{\alpha_1}*p_2^{\alpha_2}*_{...}*p_k^{\alpha_k} $$ where $$p_1<p_2<_{...}<p_k$$ Since $$x^n+1=0 \space\ (mod \space\ n)$$ we can write $x^n+1=0 \space\ (mod \space\ p_1)$ and since $n$ is odd this is equivalent to $(-x)^n-1=0 \space\ (mod \space\ p_1)$ so $(-x)^n=1 \space\ (mod \space\ p_1)$. Because of the fact that $p_1$ is the smallest prime which divides $n$ then we have $gcd(p_1-1,n)=1$. From Bezout identity we know that there exist $a,b \in Z$ such that $c=a*(p_1-1)+b*n=1$. From here it follows $(-x)^c=-x=1 \space\ (mod \space\ p_1)$. So this means $p_1|(-x-1)$ so eventually $p_1|(x+1)$. Hence we conclude that $gcd(x+1,n)\ge p_1>1$ which completes the proof.