How prove $n|2^{\frac{n(n-1)}{2}}\cdot (2-1)(2^2-1)(2^3-1)\cdots (2^{n-1}-1)$ Question:
Today, when I solve other problem, I found this follow interesting result

$$n\mid\left(2^{\frac{n(n-1)}{2}}\cdot (2-1)(2^2-1)(2^3-1)\cdots (2^{n-1}-1)\right),n\ge 1$$

It is clear $n=1$ is true.
$n=2$
$$2\mid2^{\frac{n(n-1)}{2}}\cdot (2-1)(2^2-1)(2^3-1)\cdots (2^{n-1}-1)=2$$
when $n=3$.then
$$3\mid2^{\frac{n(n-1)}{2}}\cdot (2-1)(2^2-1)(2^3-1)\cdots (2^{n-1}-1)=8\cdot 3=24$$
when
$n=4$,then
$$4\mid64\cdot 3\cdot 7$$
$$\cdots,\cdots,$$
then How prove this general?
I know this Euler theorem
$$a^{n-1}-1\equiv 1\pmod n,(a,n)=1$$
How prove it?

Let $n=2^st$ where $t$ is odd.  If $t>1$ then
$$t\mid 2^{\phi(t)}-1\ ,$$
and $\phi(t)$ is one of the numbers $1,2,\ldots,n-1$, so
$$t\mid (2-1)(2^2-1)(2^3-1)\cdots (2^{n-1}-1)\ ;$$
obviously this is also true when $t=1$.  Also, $s<n\le\frac{1}{2}n(n-1)$, so
$$2^s\mid 2^{n(n-1)/2}\ ,$$
and hence
$$n=2^st\mid 2^{n(n-1)/2}(2-1)(2^2-1)(2^3-1)\cdots (2^{n-1}-1)$$
as claimed.
