# A sort of Wolstenholme's $p^2$-congruence.

It is well-known (Wolstenholme Theorem) that for any prime $$p$$ such that $$p>3$$ the Harmonic number $$H_{p-1}$$ satisfies the congruence $$H_{p-1}:= \sum_{i=1}^{p-1}\frac{1}{i}\equiv 0 \pmod {p^2}$$ Now, for $$p>5$$, it seems to hold that

$$\sum_{i=1}^{p-3}\frac{1}{p-2-i} \sum_{j=1}^i \frac{H_j}{j+1}\equiv 0 \pmod {p^2}$$

ex for $$p=7$$ $$\frac{\frac{1}{2}}{4} +\frac{\frac{1}{2}+\frac{1+\frac{1}{2}}{3}}{3} +\frac{\frac{1}{2}+\frac{1+\frac{1}{2}}{3}+\frac{1+\frac{1}{2}+\frac{1}{3}}{4}}{2}+\frac{\frac{1}{2}+\frac{1+\frac{1}{2}}{3}+\frac{1+\frac{1}{2}+\frac{1}{3}}{4}+\frac{1+\frac{1}{2}+\frac{1}{3}+\frac{1}{4}}{5}}{1}=\frac{49}{16}$$

This is probably known, but I could not find a reference.

By manipulating the sums, I can prove that for any natural number $$n$$ such that $$n>3$$ we have $$\sum_{i=1}^{n-3}\frac{1}{n-2-i} \sum_{j=1}^i \frac{H_j}{j+1} =\frac{n}{8}\sum_{i_1+i_2+i_3+i_4=n}\frac{1}{i_1i_2i_3i_4}$$ where the sum on rhs is over all the $$4$$-uples of positive integers whose sum is $$n$$. But how can we factor $$n$$ out of $$\sum_{i_1+i_2+i_3+i_4=n}\frac{1}{i_1i_2i_3i_4}$$, when $$n>5$$?

Edit Here are the manipulations that I have done : \begin{align*} S:=&\sum_{i=1}^{n}\frac{1}{n+1-i} \sum_{j=1}^i \frac{H_j}{j+1}\\ =&\sum_{i=0}^{n-1}\frac{1}{i+1} \sum_{j=1}^{n-i} \frac{H_j}{j+1}=\sum_{i=0}^{n-1}\frac{1}{i+1} \sum_{j=0}^{n-i-1} \frac{H_{j+1}}{j+2}=\sum_{i=0}^{n-1}\frac{1}{i+1} \sum_{j=i}^{n-1} \frac{H_{j+1-i}}{j+2-i}\\ =&\sum_{j=0}^{n-1}\sum_{i=0}^{j}\frac{H_{j+1-i}}{(i+1)(j+2-i)}=\sum_{j=0}^{n-1}\sum_{i=1}^{j+1}\frac{H_{j+2-i}}{i(j+3-i)}\\ =&\sum_{j=0}^{n-1}\sum_{i=1}^{j+1}\frac{1}{i(j+3-i)}\frac{1}{2}\left(\sum_{h=1}^{j+2-i}\frac{1}{h}+\sum_{h=1}^{j+2-i}\frac{1}{h}\right)\\ =&\sum_{j=0}^{n-1}\sum_{i=1}^{j+1}\frac{1}{i(j+3-i)}\frac{1}{2}\left(\sum_{h=1}^{j+2-i}\frac{1}{h}+\sum_{h=1}^{j+2-i}\frac{1}{j+3-i-h}\right)\\ =&\sum_{j=0}^{n-1}\sum_{i=1}^{j+1}\frac{1}{i(j+3-i)}\frac{1}{2}\sum_{h=1}^{j+2-i}\frac{j+3-i}{h(j+3-i-h)}=\frac{1}{2}\sum_{j=0}^{n-1}\sum_{i=1}^{j+1}\frac{1}{i}\sum_{h=1}^{j+2-i}\frac{1}{h(j+3-i-h)}\\ =&\frac{1}{2}\sum_{j=0}^{n-1}\sum_{i=1}^{j+1}\frac{1}{i}\sum_{h+g=j+3-i}\frac{1}{h\cdot g}=\frac{1}{2}\sum_{j=0}^{n-1}\sum_{h+g+i=j+3}\frac{1}{h\cdot g\cdot i}=\frac{1}{2}\sum_{j=1}^{n}\sum_{h+g+i=n-j+3}\frac{1}{h\cdot g\cdot i}\\ =&\frac{1}{2}\sum_{h+g+i+j=n+3}\frac{1}{h\cdot g\cdot i}=\frac{1}{2}\sum_{h+g+i+j=n+3}\frac{j}{h\cdot g\cdot i\cdot j} \end{align*}

But since the product $$h\cdot g\cdot i\cdot j$$ is unaffected by any permutation of the $$4$$-uple $$(h,g,i,j)$$ we have $$\sum_{h+g+i+j=n+3}\frac{j}{h\cdot g\cdot i\cdot j}=\sum_{h+g+i+j=n+3}\frac{g}{h\cdot g\cdot i\cdot j}=\sum_{h+g+i+j=n+3}\frac{h}{h\cdot g\cdot i\cdot j}=\sum_{h+g+i+j=n+3}\frac{i}{h\cdot g\cdot i\cdot j}$$ and then \begin{align*} \sum_{i=1}^{n}\frac{1}{n+1-i} \sum_{j=1}^i \frac{H_j}{j+1}=\frac{\frac{1}{2}\sum_{h+g+i+j=n+3}\frac{h+g+i+j}{h\cdot g\cdot i\cdot j}}{4}=\frac{n+3}{8}\sum_{h+g+i+j=n+3}\frac{1}{h\cdot g\cdot i\cdot j} \end{align*}

Comments: in the second line I do reindexing, in the third line I change the order of the sumations, in lines #4 #5 I replace the Harmonic number by its expression as a sum splitted in 2 parts, one of which is reindexed. Finally, line #7 is just reindexing.

• Interesting problem. It would be great if you can include the manipulation to obtain the sum on the right side. While working with the right side, it suffices to prove the following: If $p\ge 7$ is a prime, then $$p^5|4-6\binom{2p}p +4\binom{3p}p -\binom{4p}p.$$ This is verified by running a SAGE code up to $p\leq 1471$. – i707107 Mar 27 at 22:38
• @i707107 I have included the sum manipulations. – René Gy Mar 28 at 21:30
• Your sum on the right side seems to be answered here: arxiv.org/pdf/math/0303332.pdf. – i707107 Mar 28 at 22:18
• @i707107 Thanks for the link. – René Gy Mar 28 at 22:50
• This one is more direct: ams.org/journals/proc/2007-135-05/S0002-9939-06-08777-6/… – i707107 Mar 29 at 1:47