TITLE: Proving numerator of sum is divisible by prime p
QUESTION [6 upvotes]: Let $p$ be an odd prime. For each integer $a$, set
$$S_a=\sum_{k=1}^{p-1}\frac{a^k}{k} .$$
Write $S_4+S_3-3S_2$ in the form
  $$S_4+S_3-3S_2=\frac{m}{n}$$
  where $n,m\in\mathbb Z$ satisfy $\gcd(n,m)=1$.
How to show that $p $ divides $ m$ ?

Tried looking at first and last $k$th elements:
$$\sum_{k=1}^{p-1}\frac{a^k}{k}=\sum_{k=1}^{\frac{p-1}{2}}\frac{a^k(p-k)+a^{p-k}k}{k(p-k)}=\sum_{k=1}^{\frac{p-1}{2}}\frac{a^kp-a^kk+a^{p-k}k}{k(p-k)}=\frac m n$$
If it were $a^k=1$, we'd be done (We'd have harmonic sum). But the problem is $a^k=4^k+3^k-3\cdot2^k$ and the above observation can't help with that.
Grouping terms of sum seems a dead end. For example, 
$$\sum_{k=1}^{p-1}\frac{a^k}{k}=\frac{\sum_{k=1}^{p-1}a^k\frac{(p-1)!}{k}}{(p-1)!}$$
And looking modulo $p$ terms in the numerator, doesn't yield anything nice.
Even though $p=5$ yields false hope $4+1+1+4=0+0=0$ of grouping $1.$,$2.$ and $3.$,$4.$,
already, for example, $p=11$ gives $10+ 10+ 7+ 2+ 10+ 7+ 1+ 9+ 0+ 10=0$, a sequence without a pattern, so I'm not sure how to go on proving they will all sum to $0$ modulo $p$.
First and last term (Euler's theorem) are evidently $=1=p-1$ modulo $p$, but I'm not sure how the terms in between can be handled.

REPLY [6 votes]: Nice question! As with Pascal's letter, this could be much shorter if I had
more time, but it is what it is. Chances are you can skip a lot of it.
1. Introduction to $p$-integers
Let me first build up a proper language for "congruences between rational
numbers modulo powers of $p$". This is folklore on olympiads and in AoPS, and
follows easily from some abstract algebra, but since it is much more often
used than explained, I will have to include some proofs.
Fix a prime $p$. We do not require $p$ to be odd, unless we say so.
I will use the concept of a $p$-adic valuation of a rational number; this is
defined in
https://mathoverflow.net/questions/331091/reciprocal-sum-of-binomials-and-divisibility-by-3/331850#331850
. Let me quote Proposition 1 from loc. cit.:

Proposition 1. 
(a) We have $v_{p}\left(  ab\right)  =v_{p}\left(  a\right)  +v_{p}\left(
b\right)  $ for any $a,b\in\mathbb{Q}$.
(b) We have $v_{p}\left(  a+b\right)  \geq\min\left\{  v_{p}\left(
a\right)  ,v_{p}\left(  b\right)  \right\}  $ for any $a,b\in\mathbb{Q}$.
(c) We have $v_{p}\left(  a^{k}\right)  =kv_{p}\left(  a\right)  $ for any
  $a\in\mathbb{Q}$ and $k\in\mathbb{N}$.
(d) For any $i\in\mathbb{N}$ and $n\in\mathbb{Z}$, we have the equivalence
  $\left(  p^{i}\mid n\right)  \ \Longleftrightarrow\ \left(  v_{p}\left(
n\right)  \geq i\right)  $.
(e) If $a,b\in\mathbb{Q}$ satisfy $v_{p}\left(  a\right)  >v_{p}\left(
b\right)  $, then $v_{p}\left(  a+b\right)  =v_{p}\left(  b\right)  $.
(f) Let $s$ and $t$ be two coprime integers such that $t\neq0$ and
  $v_{p}\left(  \dfrac{s}{t}\right)  \leq0$. Then, $p\nmid s$.

Now, let $\mathbb{Z}_{\left(  p\right)  }$ be the set of all rational numbers
$r\in\mathbb{Q}$ satisfying $v_{p}\left(  r\right)  \geq0$. The elements of
$\mathbb{Z}_{\left(  p\right)  }$ are called the $p$-integers (not to be
mistaken for the $p$-adic integers, whose set is denoted by $\mathbb{Z}_{p}$
without the parentheses in the subscript). The following is well-known:

Proposition 2. The set $\mathbb{Z}_{\left(  p\right)  }$ is a subring of
  $\mathbb{Q}$ satisfying $\mathbb{Z}\subseteq\mathbb{Z}_{\left(  p\right)  }$.

Proof of Proposition 2. Each integer $r$ satisfies $v_{p}\left(  r\right)
\geq0$ and thus $r\in\mathbb{Z}_{\left(  p\right)  }$ (by the definition of
$\mathbb{Z}_{\left(  p\right)  }$). In other words, the set $\mathbb{Z}
_{\left(  p\right)  }$ contains all integers. Thus, this set $\mathbb{Z}
_{\left(  p\right)  }$ contains $0$ and $1$ and $-1$. In other words,
$0\in\mathbb{Z}_{\left(  p\right)  }$ and $1\in\mathbb{Z}_{\left(  p\right)
}$ and $-1\in\mathbb{Z}_{\left(  p\right)  }$.
Let $a,b\in\mathbb{Z}_{\left(  p\right)  }$. From $a\in\mathbb{Z}_{\left(
p\right)  }$, we obtain $a\in\mathbb{Q}$ and $v_{p}\left(  a\right)  \geq0$
(by the definition of $\mathbb{Z}_{\left(  p\right)  }$). Likewise,
$b\in\mathbb{Q}$ and $v_{p}\left(  b\right)  \geq0$. Now, Proposition 1
(a) yields $v_{p}\left(  ab\right)  =\underbrace{v_{p}\left(  a\right)
}_{\geq0}+\underbrace{v_{p}\left(  b\right)  }_{\geq0}\geq0+0=0$. Hence,
$ab\in\mathbb{Z}_{\left(  p\right)  }$ (by the definition of $\mathbb{Z}
_{\left(  p\right)  }$). Moreover, $\min\left\{  v_{p}\left(  a\right)
,v_{p}\left(  b\right)  \right\}  $ must be one of the two numbers
$v_{p}\left(  a\right)  $ and $v_{p}\left(  b\right)  $, and thus is $\geq0$
(since both numbers $v_{p}\left(  a\right)  $ and $v_{p}\left(  b\right)  $
are $\geq0$ (because $v_{p}\left(  a\right)  \geq0$ and $v_{p}\left(
b\right)  \geq0$)). In other words, $\min\left\{  v_{p}\left(  a\right)
,v_{p}\left(  b\right)  \right\}  \geq0$; thus, Proposition 1 (b) yields
$v_{p}\left(  a+b\right)  \geq\min\left\{  v_{p}\left(  a\right)
,v_{p}\left(  b\right)  \right\}  \geq0$. Hence, $a+b\in\mathbb{Z}_{\left(
p\right)  }$ (by the definition of $\mathbb{Z}_{\left(  p\right)  }$).
Now, forget that we fixed $a,b$. We thus have proven that $a+b\in
\mathbb{Z}_{\left(  p\right)  }$ and $ab\in\mathbb{Z}_{\left(  p\right)  }$
for all $a,b\in\mathbb{Z}_{\left(  p\right)  }$. In other words, the subset
$\mathbb{Z}_{\left(  p\right)  }$ of $\mathbb{Q}$ is closed under addition and
closed under multiplication.
Moreover, if $a\in\mathbb{Z}_{\left(  p\right)  }$, then $\left(  -1\right)
a\in\mathbb{Z}_{\left(  p\right)  }$ (since $-1\in\mathbb{Z}_{\left(
p\right)  }$ and $a\in\mathbb{Z}_{\left(  p\right)  }$, and since
$\mathbb{Z}_{\left(  p\right)  }$ is closed under multiplication) and thus
$-a=\left(  -1\right)  a\in\mathbb{Z}_{\left(  p\right)  }$. Thus, the set
$\mathbb{Z}_{\left(  p\right)  }$ is closed under additive inverses.
Now, we have shown that the subset $\mathbb{Z}_{\left(  p\right)  }$ of
$\mathbb{Q}$ is closed under addition, closed under multiplication, and closed
under additive inverses, and contains $0$ and $1$. Thus, $\mathbb{Z}_{\left(
p\right)  }$ is a subring of $\mathbb{Q}$. Of course, $\mathbb{Z}
\subseteq\mathbb{Z}_{\left(  p\right)  }$, since $\mathbb{Z}_{\left(
p\right)  }$ contains all integers. This proves Proposition 2. $\blacksquare$
Thus, in particular, $\mathbb{Z}_{\left(  p\right)  }$ is a ring. Hence, it
makes sense to speak of divisibility and congruence in $\mathbb{Z}_{\left(
p\right)  }$; these concepts are defined as you would (hopefully) expect:

Divisibility is defined as follows: If $a,b\in\mathbb{Z}_{\left(  p\right)
}$, then we say that "$a\mid b$ in $\mathbb{Z}_{\left(  p\right)  }$" if and
only if there exists a $c\in\mathbb{Z}_{\left(  p\right)  }$ such that $b=ac$.
When $a$ is nonzero, this is equivalent to saying that $b/a\in\mathbb{Z}
_{\left(  p\right)  }$ (because obviously, if there exists a $c\in
\mathbb{Z}_{\left(  p\right)  }$ such that $b=ac$, then this $c$ must be $b/a$).
Congruence is defined as follows: If $a,b,c\in\mathbb{Z}_{\left(  p\right)
}$, then we say that "$a\equiv b\operatorname{mod}c$ in $\mathbb{Z}_{\left(
p\right)  }$" if and only if $c\mid a-b$ in $\mathbb{Z}_{\left(  p\right)  }$.

For comparison: We shall write "$a\mid b$ in $\mathbb{Z}$" for the usual
relation of divisibility of integers, and we shall write "$a\equiv
b\operatorname{mod}c$ in $\mathbb{Z}$" for the usual relation of congruence of integers.
In general, if $a$ and $b$ are two integers, then "$a\mid b$ in $\mathbb{Z}
_{\left(  p\right)  }$" is a weaker statement than "$a\mid b$ in $\mathbb{Z}$"
(that is, usual divisibility of integers). For example, we have $2\mid3$ in
$\mathbb{Z}_{\left(  5\right)  }$ (since $3=2\cdot\dfrac{3}{2}$ and $\dfrac
{3}{2}\in\mathbb{Z}_{\left(  5\right)  }$), but we don't have $2\mid3$ in
$\mathbb{Z}$. It turns out that divisibility in $\mathbb{Z}_{\left(  p\right)
}$ is a fairly rough relation that boils down to an inequality between
$p$-adic valuations (the abstract way to say this is "$\mathbb{Z}_{\left(
p\right)  }$ is a valuation ring"); here is the precise statement:

Proposition 3. Let $a\in\mathbb{Z}_{\left(  p\right)  }$ and
  $b\in\mathbb{Z}_{\left(  p\right)  }$. Then, $a\mid b$ in $\mathbb{Z}_{\left(
p\right)  }$ if and only if $v_{p}\left(  a\right)  \leq v_{p}\left(
b\right)  $.

Proof of Proposition 3. $\Longrightarrow:$ Assume that $a\mid b$ in
$\mathbb{Z}_{\left(  p\right)  }$. Thus, there exists some $c\in
\mathbb{Z}_{\left(  p\right)  }$ such that $b=ac$. Consider this $c$. Now,
from $b=ac$, we obtain $v_{p}\left(  b\right)  =v_{p}\left(  ac\right)
=v_{p}\left(  a\right)  +v_{p}\left(  c\right)  $ (by Proposition 1 (a),
applied to $c$ instead of $b$). But $c\in\mathbb{Z}_{\left(  p\right)  }$ and
thus $v_{p}\left(  c\right)  \geq0$ (by the definition of $\mathbb{Z}_{\left(
p\right)  }$). Hence, $v_{p}\left(  b\right)  =v_{p}\left(  a\right)
+\underbrace{v_{p}\left(  c\right)  }_{\geq0}\geq v_{p}\left(  a\right)  $, so
that $v_{p}\left(  a\right)  \leq v_{p}\left(  b\right)  $. This proves the
"$\Longrightarrow$" direction of Proposition 3.
$\Longleftarrow:$ Assume that $v_{p}\left(  a\right)  \leq v_{p}\left(
b\right)  $. We must show that $a\mid b$ in $\mathbb{Z}_{\left(  p\right)  }$.
If $b=0$, then this is obvious (since $b=0=a\cdot0$ in this case). Thus, WLOG
assume that $b\neq0$. Hence, $v_{p}\left(  b\right)  <\infty$, so that
$v_{p}\left(  a\right)  \leq v_{p}\left(  b\right)  <\infty$ and thus $a\neq
0$. Hence, the rational number $b/a$ is well-defined. Proposition 1 (a)
(applied to $b/a$ instead of $b$) yields $v_{p}\left(  a\left(  b/a\right)
\right)  =v_{p}\left(  a\right)  +v_{p}\left(  b/a\right)  $. Hence,
\begin{align}
v_{p}\left(  b/a\right)  =v_{p}\left(  \underbrace{a\left(  b/a\right)  }
_{=b}\right)  -v_{p}\left(  a\right)  =v_{p}\left(  b\right)  -v_{p}\left(
a\right)  \geq0
\end{align}
(since $v_{p}\left(  a\right)  \leq v_{p}\left(  b\right)  $). In other words,
$b/a\in\mathbb{Z}_{\left(  p\right)  }$ (by the definition of $\mathbb{Z}
_{\left(  p\right)  }$). Since $b=a\left(  b/a\right)  $, we thus conclude
that there exists some $c\in
\mathbb{Z}_{\left(  p\right)  }$ such that $b=ac$ (namely, $c = b/a$).
In other words, $a\mid b$ in $\mathbb{Z}_{\left(  p\right)  }$. This proves the
"$\Longleftarrow$" direction of Proposition 3. Thus, Proposition 3 is fully
proven. $\blacksquare$
Proposition 3 characterizes when an element of $\mathbb{Z}_{\left(  p\right)
}$ is divisible by another. As we have already seen, even if both elements are
integers, this is not equivalent to their divisibility in $\mathbb{Z}$. But in
the particular case when $a$ is a power of $p$, the relation $a\mid b$ in
$\mathbb{Z}_{\left(  p\right)  }$ is actually equivalent to the analogous
relation in $\mathbb{Z}$, as the following proposition shows:

Proposition 4. Let $i\in\mathbb{N}$ and $b\in\mathbb{Z}$. Then, $p^{i}\mid
b$ in $\mathbb{Z}_{\left(  p\right)  }$ if and only if $p^{i}\mid b$ in
  $\mathbb{Z}$.

I won't need this proposition in answering your question, so you can skip its proof:
Proof of Proposition 4. Proposition 1 (d) (applied to $n=b$) yields the
equivalence $\left(  p^{i}\mid b\right)  \ \Longleftrightarrow\ \left(
v_{p}\left(  b\right)  \geq i\right)  $. Since the statement "$p^{i}\mid b$"
is to be understood as "$p^{i}\mid b$ in $\mathbb{Z}$" here, we can rewrite
this equivalence as follows:
\begin{align}
\left(  p^{i}\mid b\text{ in }\mathbb{Z}\right)  \ \Longleftrightarrow
\ \left(  v_{p}\left(  b\right)  \geq i\right)  .
\end{align}
But $v_{p}\left(  p^{i}\right)  =i$ (by the definition of $p$-adic valuation).
Furthermore, $p^{i}\in\mathbb{Z}\subseteq\mathbb{Z}_{\left(  p\right)  }$ and
$b\in\mathbb{Z}\subseteq\mathbb{Z}_{\left(  p\right)  }$. Hence, Proposition 3
(applied to $a=p^{i}$) yields that $p^{i}\mid b$ in $\mathbb{Z}_{\left(
p\right)  }$ if and only if $v_{p}\left(  p^{i}\right)  \leq v_{p}\left(
b\right)  $. Hence, we have the following chain of equivalences:
\begin{align*}
\left(  p^{i}\mid b\text{ in }\mathbb{Z}_{\left(  p\right)  }\right)  \   &
\Longleftrightarrow\ \left(  \underbrace{v_{p}\left(  p^{i}\right)  }_{=i}\leq
v_{p}\left(  b\right)  \right)  \ \Longleftrightarrow\ \left(  i\leq
v_{p}\left(  b\right)  \right)  \\
& \Longleftrightarrow\ \left(  v_{p}\left(  b\right)  \geq i\right)
\ \Longleftrightarrow\ \left(  p^{i}\mid b\text{ in }\mathbb{Z}\right)
\end{align*}
(due to the equivalence $\left(  p^{i}\mid b\text{ in }\mathbb{Z}\right)
\ \Longleftrightarrow\ \left(  v_{p}\left(  b\right)  \geq i\right)  $ that we
proved above). This proves Proposition 4. $\blacksquare$
Congruence of two integers modulo a power of $p$ also means the same no matter
whether we regard them as elements of $\mathbb{Z}$ or as elements of
$\mathbb{Z}_{\left(  p\right)  }$, as the following corollary shows:

Corollary 5. Let $i\in\mathbb{N}$ and $a,b\in\mathbb{Z}$. Then, $a\equiv
b\operatorname{mod}p^{i}$ in $\mathbb{Z}_{\left(  p\right)  }$ if and only if
  $a\equiv b\operatorname{mod}p^{i}$ in $\mathbb{Z}$.

I won't need this corollary in answering your question, so you can skip its proof:
Proof of Corollary 5. The definition of congruence in $\mathbb{Z}_{\left(
p\right)  }$ shows that we have the following equivalence:
\begin{align}
\left(  a\equiv b\operatorname{mod}p^{i}\text{ in }\mathbb{Z}_{\left(
p\right)  }\right)  \ \Longleftrightarrow\ \left(  p^{i}\mid a-b\text{ in
}\mathbb{Z}_{\left(  p\right)  }\right)  .
\end{align}
The definition of congruence in $\mathbb{Z}$ shows that we have the following
equivalence:
\begin{align}
\left(  a\equiv b\operatorname{mod}p^{i}\text{ in }\mathbb{Z}\right)
\ \Longleftrightarrow\ \left(  p^{i}\mid a-b\text{ in }\mathbb{Z}\right)  .
\end{align}
But Proposition 4 (applied to $a-b$ instead of $b$) shows that $p^{i}\mid a-b$
in $\mathbb{Z}_{\left(  p\right)  }$ if and only if $p^{i}\mid a-b$ in
$\mathbb{Z}$. That is, we have the equivalence
\begin{align}
\left(  p^{i}\mid a-b\text{ in }\mathbb{Z}_{\left(  p\right)  }\right)
\ \Longleftrightarrow\ \left(  p^{i}\mid a-b\text{ in }\mathbb{Z}\right)  .
\end{align}
Thus, we have the following chain of equivalences:
\begin{align*}
\left(  a\equiv b\operatorname{mod}p^{i}\text{ in }\mathbb{Z}_{\left(
p\right)  }\right)  \   & \Longleftrightarrow\ \left(  p^{i}\mid a-b\text{ in
}\mathbb{Z}_{\left(  p\right)  }\right)  \ \Longleftrightarrow\ \left(
p^{i}\mid a-b\text{ in }\mathbb{Z}\right)  \\
& \Longleftrightarrow\ \left(  a\equiv b\operatorname{mod}p^{i}\text{ in
}\mathbb{Z}\right)
\end{align*}
(due to the equivalence $\left(  a\equiv b\operatorname{mod}p^{i}\text{ in
}\mathbb{Z}\right)  \ \Longleftrightarrow\ \left(  p^{i}\mid a-b\text{ in
}\mathbb{Z}\right)  $ that we proved above). This proves Corollary 5.
$\blacksquare$
Divisibilities and congruences in $\mathbb{Z}_{\left(  p\right)  }$ satisfy
the same basic rules that divisibilities and congruences in $\mathbb{Z}$ (and
in any commutative ring) satisfy: For example, divisibility is transitive;
congruence modulo any given $c \in \mathbb{Z}_{\left(  p\right)  }$ is an equivalence relation; congruences modulo one and the same
number $c\in\mathbb{Z}_{\left(  p\right)  }$ can be added, subtracted,
multiplied and substituted (in appropriate contexts). All of this is proven in
the same way as you would prove the analogous facts for integers.
As a rule, whenever you have a rational number $r$ written as $\dfrac{m}{n}$
with $m,n\in\mathbb{Z}$, and you want to prove that $p\mid m$, you should be
thinking of $\mathbb{Z}_{\left(  p\right)  }$ (and, specifically, of proving
that $r\equiv0\operatorname{mod}p$ in $\mathbb{Z}_{\left(  p\right)  }$). Here
are the details:

Proposition 6. Let $r\in\mathbb{Z}_{\left(  p\right)  }$ be such that
  $r\equiv0\operatorname{mod}p$ in $\mathbb{Z}_{\left(  p\right)  }$. Let
  $m,n\in\mathbb{Z}$ be integers such that $n\neq0$ and $r=\dfrac{m}{n}$. Then,
  $p\mid m$ in $\mathbb{Z}$.

Proof of Proposition 6. We have $r\equiv0\operatorname{mod}p$ in
$\mathbb{Z}_{\left(  p\right)  }$. In other words, $p\mid r-0$ in
$\mathbb{Z}_{\left(  p\right)  }$. In other words, $p\mid r$ in $\mathbb{Z}
_{\left(  p\right)  }$ (since $r-0=r$).
But $p\in\mathbb{Z}\subseteq\mathbb{Z}_{\left(  p\right)  }$. Hence,
Proposition 3 (applied to $a=p$ and $b=r$) yields that $p\mid r$  in
$\mathbb{Z}_{\left(  p\right)  }$ if and only if $v_{p}\left(  p\right)  \leq
v_{p}\left(  r\right)  $. Hence, $v_{p}\left(  p\right)  \leq v_{p}\left(
r\right)  $ (since $p\mid r$ in $\mathbb{Z}_{\left(  p\right)  }$). Thus,
$v_{p}\left(  r\right)  \geq v_{p}\left(  p\right)  =1$ (by the definition of
$p$-adic valuation). Also, $v_{p}\left(  n\right)  \geq0$ (since
$n\in\mathbb{Z}$). But $m=nr$ (since $r=\dfrac{m}{n}$), so that $v_{p}\left(
m\right)  =v_{p}\left(  nr\right)  =v_{p}\left(  n\right)  +v_{p}\left(
r\right)  $ (by Proposition 1 (a), applied to $a=n$ and $b=r$). Hence,
$v_{p}\left(  m\right)  =\underbrace{v_{p}\left(  n\right)  }_{\geq
0}+\underbrace{v_{p}\left(  r\right)  }_{\geq1}\geq1$.
Proposition 1 (d) (applied to $1$ and $m$ instead of $i$ and $n$) yields
the equivalence $\left(  p^{1}\mid m\right)  \ \Longleftrightarrow\ \left(
v_{p}\left(  m\right)  \geq1\right)  $. Hence, $p^{1}\mid m$ (since
$v_{p}\left(  m\right)  \geq1$). In other words, $p^{1}\mid m$ in $\mathbb{Z}$
(since the divisibility in Proposition 1 (d) is a divisibility in
$\mathbb{Z}$). In other words, $p\mid m$ in $\mathbb{Z}$. This proves
Proposition 6. $\blacksquare$

Proposition 7. Let $k\in\left\{  1,2,\ldots,p-1\right\}  $. Then,
  $\dfrac{1}{k}\in\mathbb{Z}_{\left(  p\right)  }$.

Proof of Proposition 7. Clearly, $k\in\mathbb{Z}\subseteq\mathbb{Z}_{\left(
p\right)  }$ and $\dfrac{1}{k}\in\mathbb{Q}$ (since $k\neq0$).
Also, $1 \in \mathbb{Z}$ and thus $v_p\left(1\right) \geq 0$.
(Actually, $v_{p}\left(  1\right)  =0$, but we don't care.)
Also, from $k\in\left\{  1,2,\ldots,p-1\right\}  $, we obtain $p\nmid k$ in
$\mathbb{Z}$. Thus, $v_{p}\left(  k\right)  =0$ (by the definition of $p$-adic
valuation). But the definition of the $p$-adic valuation of rational numbers
shows that $v_{p}\left(  \dfrac{1}{k}\right)  =v_{p}\left(  1\right)
-\underbrace{v_{p}\left(  k\right)  }_{=0}=v_{p}\left(  1\right)  \geq0$.
Hence, $\dfrac
{1}{k}\in\mathbb{Z}_{\left(  p\right)  }$ (by the definition of $\mathbb{Z}
_{\left(  p\right)  }$). This proves Proposition 7. $\blacksquare$
2. Replacing denominators by binomial coefficients
Next come our two main tricks:

Lemma 8. Let $k\in\left\{  1,2,\ldots,p-1\right\}  $. Then,
  \begin{equation}
\dfrac{1}{k}\equiv-\dfrac{1}{p}\dbinom{p}{k}\left(  -1\right)  ^{k}
\operatorname{mod}p\qquad\text{in }\mathbb{Z}_{\left(  p\right)
}.
\label{darij1.eq.l8.cong}
\tag{1}
\end{equation}
  (In particular, both sides of this congruence belong to $\mathbb{Z}_{\left(
p\right)  }$.)

Proof of Lemma 8. We shall work in $\mathbb{Z}_{\left(  p\right)  }$
throughout this proof (which means that all congruences and divisibilities are
understood to be in $\mathbb{Z}_{\left(  p\right)  }$).
For each $i\in\left\{  1,2,\ldots,k\right\}  $, we have $i\in\left\{
1,2,\ldots,k\right\}  \subseteq\left\{  1,2,\ldots,p-1\right\}  $ (since
$k\leq p-1$) and thus $\dfrac{1}{i}\in\mathbb{Z}_{\left(  p\right)  }$ (by
Proposition 7, applied to $i$ instead of $k$). In other words, the $k$ numbers
$\dfrac{1}{1},\dfrac{1}{2},\ldots,\dfrac{1}{k}$ belong to $\mathbb{Z}_{\left(
p\right)  }$. Hence, their product $\dfrac{1}{1}\cdot\dfrac{1}{2}\cdot
\cdots\cdot\dfrac{1}{k}$ belongs to $\mathbb{Z}_{\left(  p\right)  }$ as well
(since $\mathbb{Z}_{\left(  p\right)  }$ is a subring of $\mathbb{Q}$). In
other words, $\dfrac{1}{k!}$ belongs to $\mathbb{Z}_{\left(  p\right)  }$
(since $\dfrac{1}{k!}=\dfrac{1}{1\cdot2\cdot\cdots\cdot k}=\dfrac{1}{1}
\cdot\dfrac{1}{2}\cdot\cdots\cdot\dfrac{1}{k}$). In other words, $\dfrac
{1}{k!}\in\mathbb{Z}_{\left(  p\right)  }$.
The definition of $\dbinom{p}{k}$ yields
\begin{align*}
\dbinom{p}{k}  & =\dfrac{p\left(  p-1\right) \left(p-2\right) \cdots\left(  p-k+1\right)
}{k!}=\dfrac{p\cdot\left(  p-1\right)  \left(  p-2\right)  \cdots\left(
p-k+1\right)  }{k!}\\
& =p\cdot\dfrac{\left(  p-1\right)  \left(  p-2\right)  \cdots\left(
p-k+1\right)  }{k!}.
\end{align*}
Dividing this equality by $p$, we find
\begin{align}
\dfrac{1}{p}\dbinom{p}{k}=\dfrac{\left(  p-1\right)  \left(  p-2\right)
\cdots\left(  p-k+1\right)  }{k!}=\underbrace{\dfrac{1}{k!}}_{\in
\mathbb{Z}_{\left(  p\right)  }}\underbrace{\left(  p-1\right)  \left(
p-2\right)  \cdots\left(  p-k+1\right)  }_{\in\mathbb{Z}\subseteq
\mathbb{Z}_{\left(  p\right)  }}\in\mathbb{Z}_{\left(  p\right)  }
\end{align}
(since $\mathbb{Z}_{\left(  p\right)  }$ is a subring of $\mathbb{Q}$). Thus,
$-\dfrac{1}{p}\dbinom{p}{k}\left(  -1\right)  ^{k}$ belongs to $\mathbb{Z}
_{\left(  p\right)  }$ as well (since $\mathbb{Z}_{\left(  p\right)  }$ is a
ring). Furthermore, $\dfrac{1}{k}$ belongs to $\mathbb{Z}_{\left(  p\right)
}$ (by Proposition 7). Hence, we have shown that both sides of the congruence
\eqref{darij1.eq.l8.cong} belong to $\mathbb{Z}_{\left(  p\right)  }$. It
remains to actually prove this congruence.
We have $\underbrace{p}_{\equiv0\operatorname{mod}p}-i\equiv
-i\operatorname{mod}p$ for each $i\in\left\{  1,2,\ldots,k-1\right\}  $.
Multiplying these $k-1$ congruences, we obtain
\begin{align*}
& \left(  p-1\right)  \left(  p-2\right)  \cdots\left(  p-\left(  k-1\right)
\right)    \\
& \equiv\left(  -1\right)  \left(  -2\right)  \cdots\left(
-\left(  k-1\right)  \right)  =\left(  -1\right)  ^{k-1}\cdot
\underbrace{1\cdot2\cdot\cdots\cdot\left(  k-1\right)  }_{=\left(  k-1\right)
!}\\
& =\left(  -1\right)  ^{k-1}\cdot\left(  k-1\right)  !\operatorname{mod}p.
\end{align*}
Hence,
\begin{align*}
\dfrac{1}{p}\dbinom{p}{k}  & =\dfrac{1}{k!}\underbrace{\left(  p-1\right)
\left(  p-2\right)  \cdots\left(  p-k+1\right)  }_{\substack{
= \left(  p-1\right)
\left(  p-2\right)  \cdots\left(  p-\left(k-1\right)\right)
\\
\equiv\left(  -1\right)
^{k-1}\cdot\left(  k-1\right)  !\operatorname{mod}p
}}\\
& \equiv\dfrac{1}{k!}\cdot\left(  -1\right)  ^{k-1}\cdot\left(  k-1\right)
!\qquad\left(  \text{since }\dfrac{1}{k!}\in\mathbb{Z}_{\left(  p\right)
}\right)  \\
& =\dfrac{1}{k\cdot\left(  k-1\right)  !}\cdot\left(  -1\right)  ^{k-1}
\cdot\left(  k-1\right)  !\qquad\left(  \text{since }k!=k\cdot\left(
k-1\right)  !\right)  \\
& =\dfrac{1}{k}\cdot\left(  -1\right)  ^{k-1}\operatorname{mod}p.
\end{align*}
Thus,
\begin{align}
-\underbrace{\dfrac{1}{p}\dbinom{p}{k}}_{\equiv\dfrac{1}{k}\cdot\left(
-1\right)  ^{k-1}\operatorname{mod}p}\left(  -1\right)  ^{k}\equiv-\dfrac
{1}{k}\cdot\underbrace{\left(  -1\right)  ^{k-1}\cdot\left(  -1\right)  ^{k}
}_{=\left(  -1\right)  ^{2k-1}=-1}=-\dfrac{1}{k}\cdot\left(  -1\right)
=\dfrac{1}{k}\operatorname{mod}p.
\end{align}
This yields the congruence \eqref{darij1.eq.l8.cong}. Thus, Lemma 8 is proven.
$\blacksquare$
3. $S_{a}$ as quasi-Fermat quotients
Let me repeat a definition made in the question (to keep this answer self-contained):

Definition. For each integer $a$, we define a rational number
  \begin{align}
S_a = \sum_{k=1}^{p-1}\frac{a^k}{k} .
\end{align}

We can now demystify the $S_{a}$ from the question, at least as far as their
mod-$p$ congruence class in $\mathbb{Z}_{\left(  p\right)  }$ is concerned:

Lemma 9. Assume that the prime $p$ is odd. Let $a\in\mathbb{Z}$. Then,
  \begin{equation}
S_{a}\equiv-\dfrac{a^{p}+\left(  1-a\right)  ^{p}-1}{p}\operatorname{mod}
p\qquad\text{in }\mathbb{Z}_{\left(  p\right)  }.
\label{darij1.eq.l9.cong}
\tag{2}
\end{equation}
  (In particular, both sides of this congruence belong to $\mathbb{Z}_{\left(
p\right)  }$.)

Proof of Lemma 9. Let us first work in $\mathbb{Z}$ (so our divisibilities
and congruences should be interpreted in $\mathbb{Z}$). Fermat's Little
Theorem yields $a^{p}\equiv a\operatorname{mod}p$ and $\left(  1-a\right)
^{p}\equiv1-a\operatorname{mod}p$. Thus,
\begin{align}
\underbrace{a^{p}}_{\equiv a\operatorname{mod}p}+\underbrace{\left(
1-a\right)  ^{p}}_{\equiv1-a\operatorname{mod}p}-1\equiv a+\left(  1-a\right)
-1=0\operatorname{mod}p.
\end{align}
Hence, $p\mid a^{p}+\left(  1-a\right)  ^{p}-1$. Thus, $\dfrac{a^{p}+\left(
1-a\right)  ^{p}-1}{p}\in\mathbb{Z}$, so that $-\underbrace{\dfrac
{a^{p}+\left(  1-a\right)  ^{p}-1}{p}}_{\in\mathbb{Z}}\in\mathbb{Z}
\subseteq\mathbb{Z}_{\left(  p\right)  }$.
The definition of $S_{a}$ yields
\begin{align}
S_{a}=\sum_{k=1}^{p-1}\underbrace{\dfrac{a^{k}}{k}}_{=\dfrac{1}{k}a^{k}}
=\sum_{k=1}^{p-1}\underbrace{\dfrac{1}{k}}_{\substack{\in\mathbb{Z}_{\left(
p\right)  }\\\text{(by Proposition 7)}}}\underbrace{a^{k}}_{\in\mathbb{Z}
\subseteq\mathbb{Z}_{\left(  p\right)  }}\in\mathbb{Z}_{\left(  p\right)  }
\end{align}
(since $\mathbb{Z}_{\left(  p\right)  }$ is a subring of $\mathbb{Q}$). Hence,
we have shown that both sides of the congruence \eqref{darij1.eq.l9.cong}
belong to $\mathbb{Z}_{\left(  p\right)  }$. It thus remains to prove this
congruence \eqref{darij1.eq.l9.cong}.
We have $1-a=\left(  -a\right)  +1$, so that
\begin{align*}
\left(  1-a\right)  ^{p} &  =\left(  \left(  -a\right)  +1\right)  ^{p}
=\sum_{k=0}^{p}\dbinom{p}{k}\underbrace{\left(  -a\right)  ^{k}}_{=\left(
-1\right)  ^{k}a^{k}}\underbrace{1^{p-k}}_{=1}\qquad\left(  \text{by the
binomial formula}\right)  \\
&  =\sum_{k=0}^{p}\dbinom{p}{k}\left(  -1\right)  ^{k}a^{k}\\
&  =\underbrace{\dbinom{p}{0}}_{=1}\underbrace{\left(  -1\right)  ^{0}}
_{=1}\underbrace{a^{0}}_{=1}+\sum_{k=1}^{p-1}\dbinom{p}{k}\left(  -1\right)
^{k}a^{k}+\underbrace{\dbinom{p}{p}}_{=1}\underbrace{\left(  -1\right)  ^{p}
}_{\substack{=-1\\\text{(since }p\text{ is odd)}}}a^{p}\\
&  \qquad\left(
\begin{array}
[c]{c}
\text{here, we have split off the addends for }k=0\\
\text{and for }k=p\text{ from the sum}
\end{array}
\right)  \\
&  =1+\sum_{k=1}^{p-1}\dbinom{p}{k}\left(  -1\right)  ^{k}a^{k}+\left(
-1\right)  a^{p}=1+\sum_{k=1}^{p-1}\dbinom{p}{k}\left(  -1\right)  ^{k}
a^{k}-a^{p}.
\end{align*}
Adding $a^{p}-1$ to both sides of this equality, we find
\begin{align}
\left(  1-a\right)  ^{p}+a^{p}-1  & =1+\sum_{k=1}^{p-1}\dbinom{p}{k}\left(
-1\right)  ^{k}a^{k}-a^{p}+a^{p}-1\nonumber\\
& =\sum_{k=1}^{p-1}\dbinom{p}{k}\left(  -1\right)  ^{k}a^{k}
.
\label{darij1.pf.l9.5}
\tag{3}
\end{align}
Now, in $\mathbb{Z}_{\left(  p\right)  }$, we have
\begin{align*}
S_{a}  & =\sum_{k=1}^{p-1}\underbrace{\dfrac{1}{k}}_{\substack{\equiv
-\dfrac{1}{p}\dbinom{p}{k}\left(  -1\right)  ^{k}\operatorname{mod}
p\\\text{(by \eqref{darij1.eq.l8.cong})}}}a^{k}\equiv\sum_{k=1}^{p-1}\left(
-\dfrac{1}{p}\dbinom{p}{k}\left(  -1\right)  ^{k}\right)  a^{k}\\
& =-\dfrac{1}{p}\underbrace{\sum_{k=1}^{p-1}\dbinom{p}{k}\left(  -1\right)
^{k}a^{k}}_{\substack{=\left(  1-a\right)  ^{p}+a^{p}-1\\\text{(by
\eqref{darij1.pf.l9.5})}}}=-\dfrac{1}{p}\left(  \left(  1-a\right)  ^{p}
+a^{p}-1\right)  \\
& =-\dfrac{a^{p}+\left(  1-a\right)  ^{p}-1}{p}\operatorname{mod}
p\qquad\text{in }\mathbb{Z}_{\left(  p\right)  }.
\end{align*}
This proves the congruence \eqref{darij1.eq.l9.cong}.
Thus, Lemma 9 is proven. $\blacksquare$
We can now solve the question:

Corollary 10. Assume that the prime $p$ is odd. Then:
(a) We have $S_{4}+S_{3}-3S_{2}\equiv0\operatorname{mod}p$ in
  $\mathbb{Z}_{\left(  p\right)  }$. (In particular, $S_{4}+S_{3}-3S_{2}
\in\mathbb{Z}_{\left(  p\right)  }$.)
(b) Write $S_{4}+S_{3}-3S_{2}$ in the form $S_{4}+S_{3}-3S_{2}=\dfrac
{m}{n}$ for some $m,n\in\mathbb{Z}$ satisfying $n\neq0$. Then, $p\mid m$ in $\mathbb{Z}$.

Proof of Corollary 10. For each $a\in\mathbb{Z}$, we have $S_{a}
\in\mathbb{Z}_{\left(  p\right)  }$ (indeed, this was proven in our proof of
Lemma 9). Thus, in particular, we have $S_{4}\in\mathbb{Z}_{\left(  p\right)
}$ and $S_{3}\in\mathbb{Z}_{\left(  p\right)  }$ and $S_{2}\in\mathbb{Z}
_{\left(  p\right)  }$. Hence, $S_{4}+S_{3}-3S_{2}\in\mathbb{Z}_{\left(
p\right)  }$ (since $\mathbb{Z}_{\left(  p\right)  }$ is a ring).
But Fermat's Little Theorem yields $2^{p}\equiv2\operatorname{mod}p$ in
$\mathbb{Z}$; thus, $p\mid2^{p}-2$ in $\mathbb{Z}$. In other words, there
exists an integer $c$ such that $2^{p}-2=pc$. Consider this $c$.
Clearly, $c \in \mathbb{Z} \subseteq \mathbb{Z}_{\left(  p\right)  }$.
(a) We shall work in $\mathbb{Z}_{\left(  p\right)  }$ throughout this
proof (which means that all congruences and divisibilities are understood to
be in $\mathbb{Z}_{\left(  p\right)  }$).
Lemma 9 (applied to $a=4$) yields
\begin{align}
S_{4}\equiv-\dfrac{4^{p}+\left(  1-4\right)  ^{p}-1}{p}=-\dfrac{4^{p}-3^{p}
-1}{p}\operatorname{mod}p
\end{align}
(since $4^{p}+\left(  1-4\right)  ^{p}=4^{p}+\underbrace{\left(  -3\right)
^{p}}_{\substack{=-3^{p}\\\text{(since }p\text{ is odd)}}}=4^{p}-3^{p}$).
Similar computations show
\begin{align}
S_{3}\equiv-\dfrac{3^{p}-2^{p}-1}{p}\operatorname{mod}p
\end{align}
and
\begin{align}
S_{2}\equiv-\dfrac{2^{p}-1^{p}-1}{p}\operatorname{mod}p.
\end{align}
Combining these three congruences, we obtain
\begin{align*}
& S_{4}+S_{3}-3S_{2}\\
& \equiv\left(  -\dfrac{4^{p}-3^{p}-1}{p}\right)  +\left(  -\dfrac{3^{p}
-2^{p}-1}{p}\right)  -3\left(  -\dfrac{2^{p}-1^{p}-1}{p}\right)  \\
& =\left(  -\dfrac{\left(  2^{p}\right)  ^{2}-3^{p}-1}{p}\right)  +\left(
-\dfrac{3^{p}-2^{p}-1}{p}\right)  -3\left(  -\dfrac{2^{p}-1-1}{p}\right)  \\
& \qquad\left(  \text{since }4^{p}=\left(  2^{p}\right)  ^{2}\text{ and }
1^{p}=1\right)  \\
& =\dfrac{-\left(  2^{p}-2\right)  ^{2}}{p}\qquad\left(  \text{by
straightforward computations}\right)  \\
& =\dfrac{-\left(  pc\right)  ^{2}}{p}\qquad\left(  \text{since }
2^{p}-2=pc\right)  \\
& =-pc^{2}\equiv0\operatorname{mod}p
\end{align*}
(since $c \in \mathbb{Z} \subseteq \mathbb{Z}_{\left(  p\right)  }$).
This proves Corollary 10 (a).
(b) Corollary 10 (a) yields $S_{4}+S_{3}-3S_{2}\equiv
0\operatorname{mod}p$ in $\mathbb{Z}_{\left(  p\right)  }$ (which means, in
particular, that $S_{4}+S_{3}-3S_{2}\in\mathbb{Z}_{\left(  p\right)  }$).
Hence, Proposition 6 (applied to $r=S_{4}+S_{3}-3S_{2}$) yields $p\mid m$ in $\mathbb{Z}$.
This proves Corollary 10 (b). $\blacksquare$