# If a prime $p$ satisfies given condition then $p^{4} \mid ap-b$

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!

-

$\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)

-

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

-

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$.

-