Dejemos que $p=2h+1$ . Por el pequeño teorema de Fermat, tenemos \begin{align*} S:=\sum_{i=1}^k i^{-1}- \sum_{i=1}^k (i+h)^{-1}\equiv \sum_{i=1}^k i^{p-2}- \sum_{i=1}^k (i+h)^{p-2} \pmod p \end{align*} desde $1\le i, i+h <p$ . Entonces, \begin{align*} S\equiv& -\sum_{i=1}^k\sum_{j= 0} ^{p-3}\binom{p-2}{j} i^j h^{p-2-j} \pmod p\\ \equiv& -\sum_{j= 0} ^{p-3}\binom{p-2}{j}h^{p-2-j} \sum_{i=1}^ki^j \pmod p.\\ \end{align*} Pero $\binom{p-2}{j} \equiv (j+1)(-1)^j \bmod p$ entonces \begin{align*} S\equiv& -\sum_{j= 0} ^{p-3}(j+1)(-1)^j h^{p-2-j} \sum_{i=1}^k i^j \pmod p\\ \equiv& \sum_{j= 0} ^{p-3}(-h)^{p-2-j} (j+1)\sum_{i=1}^ki^j \pmod p\\ \equiv& 2\sum_{j= 0} ^{p-3}(j+1)\sum_{i=1}^k(2i)^j \pmod p\\ \equiv& 2 \sum_{i=1}^k\sum_{j= 0} ^{p-3}(j+1)(2i)^j \pmod p\\ \end{align*} Ahora \begin{align*} \sum_{j= 0} ^{p-3}(j+1)(2i)^j =\frac{(p-2)(2i)^{p-1}-(p-1)(2i)^{p-2}+1}{(2i-1)^2} &\equiv -\frac{1}{2i(2i-1)} \pmod p\\ & \equiv \frac{1}{2i}-\frac{1}{2i-1} \pmod p. \end{align*} Entonces \begin{align*} S\equiv& 2 \sum_{i=1}^k \left( \frac{1}{2i}-\frac{1}{2i-1}\right) \pmod p\\ \equiv&2\left(\sum_{i=1}^k\frac{1}{i}-\sum_{i=1}^{2k}\frac{1}{i}\right) \pmod p\\ \equiv&-2\sum_{i=k+1}^{2k}\frac{1}{i}\pmod p\\ \equiv&-2\sum_{i=1}^k\frac{1}{k+i}\pmod p\\ \equiv&-6\sum_{i=1}^k\frac{1}{3i-1}\pmod p\\ \equiv&-6\sum_{i=1}^{p-1}\frac{1}{i}+6\sum_{i=1}^k\frac{1}{3i-2}+6\sum_{i=1}^k\frac{1}{3i}\pmod p \end{align*} Pero \begin{align*}\sum_{i=1}^k\frac{1}{3i-2} =\sum_{j=1}^k\frac{1}{3(k-j+1)-2}=\sum_{j=1}^k\frac{1}{p-1-3j+1} \equiv -\sum_{j=1}^k\frac{1}{3j} \pmod p\end{align*} Entonces \begin{align*} S\equiv& -6\sum_{i=1}^{p-1}\frac{1}{i} \pmod p. \end{align*} y esto es cero por un resultado bien conocido. $\square$