Prove a congruence for prime number If $p$ is a prime number, then prove that $p!(1^{*}-2^{*}+3^{*}-...-(p-1)^{*}) \equiv 2-2^{p} \pmod{p^2}$ where $k^{*}k\equiv 1 \pmod {p}$.
I try to change the prove of Wolstenholme's Theorem, which is approximately similar to this problem, but I can't prove this correctly.
 A: We can start with expanding the binomial,
$$2^p=(1+1)^p = \sum_{n=0}^p \binom{p}{n} \mod p^2$$
Then subtract the first and last terms,
$$2^p-2 = \sum_{n=1}^{p-1} \binom{p}{n} \mod p^2$$
We can use the simple identity $\binom{a}{b}=\frac{a}{b}\binom{a-1}{b-1}$ to get,
$$2^p-2 = p \sum_{n=1}^{p-1}\frac{1}{n}\binom{p-1}{n-1} \mod p^2$$
At this point we know the right hand side is divisible by $p$ at least once, so everything multiplying $p$ can be thought of as just being a congruence mod $p$, so we just need to focus on,
$$\sum_{n=1}^{p-1}\frac{1}{n}\binom{p-1}{n-1} \mod p$$
We can rewrite the binomial coefficients in terms of the product,
$$\binom{p-1}{n-1} = \prod_{k=0}^{n-2} \frac{p-1-k}{k+1} =  \prod_{k=0}^{n-2} \frac{-1-k}{k+1} = (-1)^{n-1} \mod p$$
Plugging in gets us,
$$\sum_{n=1}^{p-1}\frac{(-1)^{n-1}}{n} \mod p$$
This means we have shown,
$$2^p-2 = p \sum_{n=1}^{p-1}\frac{(-1)^{n-1}}{n}\mod p^2$$
Now we just need to multiply both sides by $-1$ and Wilson's theorem let's us write $-1 = (p-1)! \mod p$ which combines with $p$ to make $p!$.
$$2-2^p = p! \sum_{n=1}^{p-1}\frac{(-1)^{n-1}}{n}\mod p^2$$
