Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Question If $p > 3$ is a prime and $$ 1 + \frac{1}{2} + \frac{1}{3} + \cdots + \frac{1}{p} = \frac{a}{b}$$ then prove that $p^{4} \mid (ap-b)$.

There is an exercise in Herstein which states, if $p > 3$ is prime and if $$1 + \frac{1}{2} + \cdots + \frac{1}{p-1} = \frac{a}{b}$$ then $p^{2} \mid a$. (Page 116, Problem 2). But i am not sure whether this helps or not. Hints, suggestions would be of great help!

share|cite|improve this question
up vote 5 down vote accepted

$\frac{a}{b} = \frac{p^{2}\alpha}{\beta} + \frac{1}{p}$ where $(\alpha,\beta) = (p,\beta) = 1$

It follows immediately from this I believe.

So the exercise helps.


Also, a hint for the exercise: consider $f(x) = (x-1)(x-2)\cdots(x-p+1)$. Does $p^2$ divide $f'(0)$ (derivative of f at 0)? (This is a classic proof of that exercise and should be available in textbooks)

share|cite|improve this answer

HINT $\rm\;\;\displaystyle p^4\:\big|\:ap-b = \:bp\bigg(\frac{a}{b} - \frac{1}{p}\bigg)\;\;$ via $\rm\;\; p^2|bp\;\;$ and $\rm\displaystyle\; p^2\:\big|\:\bigg(\frac{a}{b} - \frac{1}{p}\bigg)\;\;$ via Wolstenholme

share|cite|improve this answer

From Wolstenholme's Theorem we may assume that, $1+\frac{1}{2}+.....+\frac{1}{p-1}=p^2\frac{x}{y}$. Then $\frac{a}{b}=\frac{p^2x}{y}+\frac{1}{p}$. This gives us, $\frac{ap-b}{b}=\frac{p^3x}{y}$. Or, $y(ap-b)=bp^3x$. Obviously, $p\not|y,p|b$. Let $b=pk$. We have $y(ap-b)=kp^4x$. This equation gives $p^4|y(ap-b)$ And since $\gcd(p,y)=1,p^4|ap-b$.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.