
3. Determine all prime numbers $p$, such that the number

$$
\left(\begin{array}{l}
p \\
1
\end{array}\right)^{2}+\left(\begin{array}{l}
p \\
2
\end{array}\right)^{2}+\ldots+\left(\begin{array}{c}
p \\
p-1
\end{array}\right)^{2}
$$

is divisible by $p^{3}$.


Solution. We start from the observation that for $k=1,2, \ldots, p$ we have

$$
\left(\begin{array}{l}
p-1 \\
k-1
\end{array}\right) \equiv \pm 1 \quad(\bmod p)
$$

To see this, note that

$$
\begin{aligned}
& \begin{array}{lll}
p-1 \equiv & -1 & (\bmod p) \\
p-2 \equiv & -2 & (\bmod p)
\end{array} \\
& \begin{array}{ccc}
\vdots & \vdots & \vdots \\
k & \equiv-(p-k) & (\bmod p)
\end{array}
\end{aligned}
$$

hence, multyplying,

$$
\frac{(p-1) !}{(k-1) !} \equiv \pm(p-k) ! \quad(\bmod p)
$$

and (1) follows. This can be written in an equivalent form

$$
\frac{k}{p}\left(\begin{array}{l}
p \\
k
\end{array}\right) \equiv \pm 1 \quad(\bmod p)
$$

which implies that

$$
\left(\begin{array}{l}
p \\
k
\end{array}\right)=p \cdot \frac{a_{k} p \pm 1}{k}
$$

for some integer $a_{k}$. Therefore, if $p$ satisfies the given conditions, we have

$$
p \left\lvert\, \sum_{k=1}^{p-1} \frac{\left(a_{k} p \pm 1\right)^{2}}{k^{2}}\right.
$$

or $p \mid \sum_{k=1}^{p-1} 1 / k^{2}$, where by $1 / m$ we understand the unique integer $1 \leqslant l \leqslant p-1$ satisfying $m l \equiv 1(\bmod p)$. Now observe that $1 / k^{2} \equiv(1 / k)^{2}(\bmod p)$ and

$$
\sum_{k=1}^{p-1} \frac{1}{k^{2}} \equiv \sum_{k=1}^{p-1} k^{2}=\frac{p(p-1)(2 p-1)}{6} \quad(\bmod p)
$$

which is divisible by $p$ if and only if $p \geqslant 5$.
