How do I prove that if $p$ is prime then $p$ divides $2^{p}-2$? I know that if $p$ divides $2^{p}-2$ can be written as $2^p - 2 \equiv 0 \bmod p$, but then I get stuck. Im not sure how to take an approach on this. 
 A: HINT
$$(a+1)^p-(a+1)\equiv a^p- a\pmod p$$ as $p\mid\binom pk$ for $1\le k<p$
A: $$(2\cdot1)\cdot(2\cdot 2)...(2\cdot (p-1))=1\cdot2 ...\cdot (p-1)\ \ \ \ (\text{ mod } p )$$
Where the factors on the left and right are equal but not necessarily in the order written.

The reason is that the remainders of $2\cdot i$ mod $p$ are all different (and different to zero) for different $1\leq i\leq p-1$ and therefore are all the numbers $1,2,...,p-1$.

Then
$$2^{p-1}\cdot(p-1)!=(p-1)!\ \ \ \ (\text{ mod }p )$$
$$2^{p-1}=1\ \ \ \ (\text{ mod }p )$$
$$2^{p}=2\ \ \ \ (\text{ mod }p )$$
A: Fermat's little theorem states that $a^{p-1}-1$ is divisible by $p$ for any prime $p$ and any integer $a$.
A: Can you use Fermat's well-proven little theorem? 
Given an integer $b$ and a prime number $p$ such that $\gcd(b, p) = 1$, Fermat's little theorem tells us that $b^{p - 1} \equiv 1 \bmod p$. From this we can easily deduce that $b^p \equiv b \bmod p$ and therefore $b^p - b \equiv 0 \bmod p$, which means that $b^p - b$ is a multiple of $p$ as asserted.
For your question, we have $b = 2$, which is coprime to all odd primes. And so we have:


*

*$2^3 - 2 = 6 = 2 \times 3$

*$2^5 - 2 = 30  = 2 \times 3 \times 5$

*$2^7 - 2 = 126 = 2 \times 3^2 \times 7$

*etc.


Of course 2 is a prime but it is not coprime to itself. But it does us no harm to examine it as a single case: $2^2 - 2 = 2$.
But if you can't use Fermat's little theorem, you'd probably have to reinvent the wheel.
