<s>[INST] 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! 
 [/INST] 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$.
</s>