# Number Theory: Prime modulus and Wolstenholme's congruence

I apologize if my title is inappropriate, but I couldn't think of a better title name pertaining to this particular problem I have other than listing the section's name of this particular textbook I am using. I've been working on this number theory for a long time and can't figure out this problem. If it helps, the problem is found in Niven's Chapter 2 section 7, which talks about Wolstenholme's Congruence. It is the section after Hensel's Lemma.

Problem: Assume the prime $p \geq 3$. Let $\frac{a}{(p-1)!} = \frac{1}{1} - \frac{1}{2} + \frac{1}{3} - \cdots - \frac{1}{p-1}$. Prove that $a \equiv (2 - 2^p)/p \mod p$.

Here's my attempt at this problem. I said that it is equivalent in proving that $ap \equiv (2 - 2^p) \mod p^2$. However, this is equivalent in proving that ($2^p - 2) + ap \equiv 0 \mod p^2$. By Fermat's Little Theorem, we know that $(2^p - 2) + ap \equiv 0 \mod p$ holds. From here, I said that let $f(x) = x^p - x + ap$. Note that $f(x) \equiv 0 \mod p$, for any $x \in (\mathbb{Z}/p\mathbb{Z})$. But $f'(x) = px^{p-1} - 1 \equiv -1 \mod p$. So since $f(2) \equiv 0 \mod p$ but $f'(2) \equiv -1 \mod p$, by Hensel Lemma, there exists a unique $t$ in $(\mathbb{Z}/p\mathbb{Z})$ such that $f(2+tp) \equiv 0 \mod p^2$.

$f(2+tp) = (2+tp)^p - (2+tp) + ap \equiv 0 \mod p^2$. Equivalently, we have $-f(2+tp) = (2+tp) - (2+tp)^p - ap \equiv 0 \mod p$. Using the binomial theorem, we have that $(2+tp)^p = \displaystyle\sum_{0 \leq i \leq p}{p \choose i}(tp)^i2^{p-i} \equiv 2^p \mod p^2$. So we have that $(2+tp) - 2^p - ap \equiv 0 \mod p^2$. After rearranging the terms in the congruence, we have $(2^p - 2) + ap - tp \equiv 0 \mod p^2$. Now, all I need to show is that $t \equiv 0 \mod p$.

So I started with the expression $\frac{a}{(p-1)!} = \frac{1}{1} - \frac{1}{2} + \frac{1}{3} - \cdots - \frac{1}{p-1} = (\frac{1}{1} + \frac{1}{2} + \cdots + \frac{1}{p-1}) - 2(\frac{1}{2} + \frac{1}{4} + \cdots + \frac{1}{p-1}) = (\frac{1}{1} + \frac{1}{2} + \cdots + \frac{1}{p-1}) - (\frac{1}{1} + \frac{1}{2} + \cdots + \frac{1}{\frac{p-1}{2}}) = \frac{1}{\frac{p+1}{2}} + \frac{1}{\frac{p+3}{2}} + \cdots + \frac{1}{\frac{p+(p-2)}{2}} = \frac{2}{p+1} + \frac{2}{p+3} + \cdots + \frac{2}{p + (p-2)}$. I guess where I am stuck is I could not get $a$ in the form where it can be useful in $(\mathbb{Z}/p\mathbb{Z})$. I have tried rearranging it only to get an expression I believe that does look ugly.

Any hint or any alternative way in how I can view this problem will be useful and appreciated. Thanks!

-

## 1 Answer

$$2^p=(1+1)^p=\sum_{k=0}^{p}\binom{p}{k}=2+\sum_{k=1}^{p-1}\binom{p}{k}.$$ Now $\binom{p}{k}/p=\frac{(p-1)\dots(p-(k-1))}{1\dots k}\equiv(-1)^{k-1}1/k$ mod $p$ (for $1\leq k\leq p-1$), so we are done.

-
Thanks. After I went to my professor's office hours, I got a hint which helped me solve this problem. The hint was the first line in your post. – MathNewbie Oct 22 '12 at 23:15