Problem: Let $q = \frac{3p-5}{2}$ where $p$ is an odd prime, and let
\[ S_q = \frac{1}{2\cdot 3 \cdot 4} + \frac{1}{5\cdot 6 \cdot 7}
+ \dots + \frac{1}{q(q+1)(q+2)}. \]
Prove that if $\frac{1}{p}-2S_q = \frac{m}{n}$ for integers $m$ and $n$,
then $m - n$ is divisible by $p$.

Solution: By partial fractions, we have
\[
  \frac{2}{(3k-1)(3k)(3k+1)}
  = \frac{1}{3k-1} - \frac{2}{3k} + \frac{1}{3k+1}.
\]
Thus
\begin{align*}
  2S_q
  &= \left( \frac12 - \frac23 + \frac14 \right)
  + \left( \frac 15 - \frac26 + \frac17 \right)
  + \dots
  + \left( \frac1q - \frac2{q+1} + \frac{1}{q+2} \right) \\
  &= \left( \half + \frac13 + \frac14 + \dots + \frac{1}{q+2} \right)
  - 3\left( \frac13 + \frac 16 + \dots + \frac{1}{q+1} \right) \\
  &= \left( \half + \frac13 + \frac14 + \dots + \frac{1}{q+2} \right)
  - \left( \frac11 + \frac 12 + \dots + \frac{1}{\frac{q+1}{3}} \right) \\
  \implies 2S_q - \frac1p + 1
  &=  \left( \frac11 + \frac12 + \dots + \frac{1}{p-1} \right)
  + \left( \frac{1}{p+1} + \frac{1}{p+2} \dots + \frac{1}{q+2} \right)
  - \left( \frac11 + \frac 12 + \dots + \frac{1}{\frac{q+1}{3}} \right)
\end{align*}

Now we are ready to take modulo $p$.
The given says that $q-p+2 = \frac{q+1}{3}$, so
\begin{align*}
  2S_q - \frac1p + 1
  &=  \left( \frac11 + \frac12 + \dots + \frac{1}{p-1} \right)
  + \left( \frac{1}{p+1} + \frac{1}{p+2} + \dots + \frac{1}{q+2} \right)
  - \left( \frac11 + \frac 12 + \dots + \frac{1}{\frac{q+1}{3}} \right) \\
  &\equiv  \left( \frac11 + \frac12 + \dots + \frac{1}{p-1} \right)
  + \left( \frac11 + \frac12 + \dots + \frac{1}{q-p+2} \right)
  - \left( \frac11 + \frac 12 + \dots + \frac{1}{\frac{q+1}{3}} \right) \\
  &= \frac11 + \frac12+ \dots + \frac{1}{p-1} \\
  &\equiv 0 \pmod p.
\end{align*}

So $\frac1p - 2S_q \equiv 1 \pmod p$ which is the desired.