Pretty $p^2$-congruences involving Stirling numbers of the both kinds

combinatoricselementary-number-theorynumber theoryreference-requeststirling-numbers

Let $p$ an odd prime number and ${n\brack {k}}$ (resp. ${n\brace k}$) be the Stirling numbers of first (resp. second) kind, such that:
$$ \sum_{k\ge0} {{n}\brack {k}}x^k = \prod_{j=0}^{n-1}(x+j)$$
$$ \sum_{k\ge0} {{n}\brace {k}}\prod_{j=0}^{k-1}(x-j) = x^n$$
Let $m$ an integer such that $1\le m\le p$, we have

\begin{align*} {{p+m}\brack {p}}+{{p}\brace {p-m}}&\equiv 0 \pmod
{p^2}\\ {{p+m}\brace {p}}+{{p}\brack {p-m}}&\equiv 0 \pmod {p^2}
\end{align*}

This is probably not new. Where can one find a reference?

EDIT From @i707107 answer, for odd $m$ in the range $3\le m \le p-2 $, we also have the nice

\begin{align*}{{p+m}\brace {p}}&\equiv {{p}\brack {p-m}} \pmod {p^3}
\end{align*}

Best Answer

The first congruence

According to the linked paper in comments, we have for $1\leq m<p$, by (1.7) $$ {{p+m}\brack {p}}\equiv \frac pm \binom{p+m}m (-1)^m B_m^{(m)} \ \textrm{ mod }p^2.$$ Also, by (1.8), $$ {{p}\brace {p-m}}\equiv -\frac pm \binom{p-1}m B_m^{(m)} \ \textrm{ mod }p^2. $$ So, for your first conguence, we need to check if $$ -\binom{p-1}m+(-1)^m\binom{p+m}m \equiv 0 \ \textrm{ mod }p. $$ Writing down the binomial coefficients, we see that their denominators are $m!$ and numerator is zero mod $p$. Thus, your first congruence is true for $1\leq m<p$.

For $m=p$, the Stirling's second kind gives $0$. The first kind is by (1.4), $$ {{2p}\brack {p}}\equiv -\frac{4p^3}{2(p-1)}\binom{2p-1}pB_{p-1} \ \textrm{ mod }p^3. $$ Let $\nu_p(n)$ be the $p$-adic valuation of $n$. Then we have $$ \nu_p(\binom{2p-1}p)=0, \ \ \nu_p(B_{p-1})=-1. $$ The last one is by von Staudt-Clausen. This gives $p^2|{{2p}\brack {p}}$, the result for $m=p$ follows.

The second congruence

For even number $m$ in $1\le m <p$, by (1.3) and (1.5), $${{p}\brack {p-m}}\equiv -\frac pm \binom{p-1}m B_m \ \textrm{ mod } p^2.$$ $$ {{p+m}\brace {p}}\equiv \frac pm \binom{p+m}mB_m \ \textrm{ mod }p^2. $$ Thus, the second congruence follows by the same way the first congruence is treated.

For odd number $m$ in $1\le m \le p$, by (1.4) and (1.6), $${{p}\brack {p-m}}\equiv -\frac{p^2m}{2(m-1)} \binom{p-1}m B_{m-1} \ \textrm{ mod } p^3.$$ $$ {{p+m}\brace {p}}\equiv \frac{p^2m}{2(m-1)} \binom{p+m}m B_{m-1} \ \textrm{ mod } p^3 $$ Also, by von Staudt-Clausen, the Bernoulli number does not have $p$ as a factor of denominator if $m<p$. Thus, we have the result.

For $m=p$, by von Staudt-Clausen, $\nu_p(B_{p-1})=-1$. So, $p^2$ divides both Stirling numbers. The result hence follows.