prove or disprove $(x+1)^{2p^2}\equiv x^{2p^2}+\binom{2p^2}{p^2}x^{p^2}+1\pmod {p^2}$ The following question I read in a book, but the book does not give proof. I doubt the correctness of the result
let $p>3$ be prime number. prove or disprove
$$(x+1)^{2p^2}\equiv x^{2p^2}+\binom{2p^2}{p^2}x^{p^2}+1\pmod {p^2}\tag{1}$$
I think use binomial theorem
it maybe show $$\binom{2p^2}{k}\equiv 0,\pmod {p^2},k=1,2,\cdots,p^2-1,p^2+1,\cdots,2p^2-1\tag{2}$$
but  other hand I think (2) is not right.becuase let  $p=5,k=5$
we have $$\binom{2p^2}{k}=\binom{50}{5}=\dfrac{50\cdot 49\cdot 48\cdot 47\cdot 46}{5\cdot 4\cdot 3\cdot 2\cdot 1}\ne 0\pmod {25}$$,so I think $(1)$ is not right?
 A: You got it right. By Lucas correspondence the congruence (1) would be correct if it were modulo $p$ only. If we did this modulo $p$ we would be doing arithmetic in the ring $\Bbb{Z}_p[x]$ — a commutative ring of characteristic $p$. This means that we can apply Freshman's Dream twice, and get
$$
\begin{aligned}
(x+1)^{2p^2}&=\left((x+1)^2\right)^{p^2}\\
&=\left((x^2+2x+1)^p\right)^p\\
&\equiv\left(x^{2p}+2^px^p+1\right)^p\pmod{p}\\
&\equiv\left(x^{2p}+2x^p+1\right)^p\pmod{p}\\
&\equiv x^{2p^2}+2x^{p^2}+1\pmod{p}.
\end{aligned}
$$
But, this is only modulo $p$.
Your example is the first failure modulo $p^2$. Well, the same way you would see that $\binom{18}3$ is not divisible by $9$, but the question specified $p>3$. Well done.
Kummer's theorem (see Qiaochu's link) says the same thing. When you do grade school addition of $5+45$ in base five there will only be a single carry, from the $5^1$-digit to the $5^2$-digit. Hence $\binom{50}5$ is divisible by $5^1$ but not divisible by $5^2$. For the same reason $\binom{2p^2}p$ is not divisible by $p^2$ for any prime $p>2$.
As the last observation, when $p=2$ the congruence (1) will be correct modulo $4$. For example the binomial coefficient $\binom 82$ is divisible by $2^2$ as $8$ has a non-zero bit at position $2^3$, and we get the required two carries when calculating $2+6$ in base two.
A: Let $p = 5$. For any integer $k$, we have
$$\begin{equation}\begin{aligned}
& ((5k + 1)(5k + 2))((5k + 3)(5k + 4)) \\
& \equiv (25k^2 + 15k + 2)(25k^2 + 35k + 12) \\
& \equiv (15k + 2)(10k + 12) \\
& \equiv 150k^2 + 200k + 24 \\
& \equiv -1 \pmod{25}
\end{aligned}\end{equation}\tag{1}\label{eq1A}$$
Using this for each group of a product of $4$ consecutive integers between multiples of $5$, we get
$$\begin{equation}\begin{aligned}
\binom{50}{25} & \equiv \frac{50(-1)45(-1)40(-1)35(-1)30(-1)}{25(-1)20(-1)15(-1)10(-1)5(-1)} \\
& \equiv \frac{2(45)(2)(35)(2)}{10(5)} \\
& \equiv 9(2)(7)(2) \\
& \equiv 2 \pmod{25}
\end{aligned}\end{equation}\tag{2}\label{eq2A}$$
Since $\varphi(25) = 20$, with $x = 1$, your congruence equation becomes
$$\begin{equation}\begin{aligned}
2^{50} \equiv 1 + 2 + 1 \pmod{25} \\
2^{10} \equiv 4 \pmod{25} \\
1024 \equiv 4 \pmod{25} \\
24 \equiv 4 \pmod{25}
\end{aligned}\end{equation}\tag{3}\label{eq3A}$$
Of course, this is not true, so this gives one specific counter-example to show the book's statement is not correct for all primes $p \gt 3$.
