# Prove that for any even positive integer $n, n^{2}-1$ divides $2^{n !}-1$ [duplicate]

Question - Prove that for any even positive integer $$n, n^{2}-1$$ divides $$2^{n !}-1$$

Proof: Let $$m=n+1 .$$ We need to prove that $$m(m-2)$$ divides $$2^{(m-1) !}-1$$

Because $$\varphi(m)$$ divides $$(m-1) !$$

we have $$\left(2^{\varphi(m)}-1\right) |\left(2^{(m-1) !}-1\right)$$

and from Euler's theorem, $$m |\left(2^{\varphi(m)}-1\right) .$$ It follows that $$m |\left(2^{(m-1) !}-1\right) .$$

Similarly $$(m-2) |\left(2^{(m-1) !}-1\right) .$$ Because $$m$$ is odd, gcd $$(m, m-2)=1$$ and the conclusion follows.

I just want to understand how they write

Similarly $$(m-2) |\left(2^{(m-1) !}-1\right) .$$

## 2 Answers

Here's my initial thought:

Because $$\varphi(m-2)$$ divides $$(m-3)!$$ then it also divides $$(m-1)!$$.

Does that help?

• but we have to prove $(m-2) |\left(2^{(m-1) !}-1\right)$.. – Ishan May 15 at 8:49
• ohh, yess i see that thanks.. – Ishan May 15 at 8:51

Firstly we write the even integer $$n$$ as $$m-1$$, then $$n^2-1=(n+1)(n-1)=m(m-2)$$, where $$m$$ is odd. The totient funcion $$\varphi(m)\leq m-1$$ and is equal to $$m-1$$ if and only if $$m$$ is a prime. Hence $$\varphi(m)\mid (m-1)!$$, as $$\varphi(m)$$ has to be one of the numbers between $$1$$ and $$m-1$$. Hence $$(m-1)!=k\varphi(m)$$ for some $$k\in\mathbb{Z}$$. The factoring \begin{align*} 2^{(m-1)!}-1&= 2^{k\varphi(m)}-1\\ =(2^{\varphi(m)}-1)&(2^{\varphi(m)(k-1)}+ 2^{\varphi(m)(k-2)}+\dotsb+ 2^{\varphi(m)}+ 1) \end{align*} shows we have $$(2^{\varphi(m)}-1)\mid (2^{(m-1)!}-1)$$, and by Euler's theorem $$2^{\varphi(m)}\equiv1\pmod{m}$$, implying $$m\mid (2^{(m-1)!}-1)$$ also.

Similarly $$\varphi(m-2)\mid (m-1)!$$, as $$\varphi(m-2)$$ has to be one of the numbers between $$1$$ and $$m-2$$. Hence $$(m-1)!=j\varphi(m-2)$$ for some $$j\in\mathbb{Z}$$. The factoring \begin{align*} 2^{(m-1)!}-1&= 2^{j\varphi(m-2)}-1\\ =(2^{\varphi(m-2)}-1)&(2^{\varphi(m-2)(j-1)}+ 2^{\varphi(m-2)(j-2)}+\dotsb+ 2^{\varphi(m-2)}+ 1) \end{align*} shows we have $$(2^{\varphi(m-2)}-1)\mid (2^{(m-1)!}-1)$$, and by Euler's theorem $$2^{\varphi(m-2)}\equiv1\pmod{m-2}$$, implying $$m-2\mid (2^{(m-1)!}-1)$$ also.

Finally since $$m$$ and $$m-2$$ are adjacent odd numbers, they are also coprime, which shows the product $$m(m-2)=(n+1)(n-1)=n^2-1\mid 2^{n!}-1$$ as required.