Von Staudt–Clausen theorem

In number theory, the von Staudt–Clausen theorem is a result determining the fractional part of Bernoulli numbers, found independently by and.

Specifically, if $n$ is a positive integer and we add $1/p$ to the Bernoulli number $B_{2n}$ for every prime $p$ such that $p &minus; 1$ divides $2n$, then we obtain an integer; that is,

$$ B_{2n} + \sum_{(p-1)|2n} \frac1p \in \Z. $$

This fact immediately allows us to characterize the denominators of the non-zero Bernoulli numbers $B_{2n}$ as the product of all primes $p$ such that $p &minus; 1$ divides $2n$; consequently, the denominators are square-free and divisible by 6.

These denominators are
 * 6, 30, 42, 30, 66, 2730, 6, 510, 798, 330, 138, 2730, 6, 870, 14322, 510, 6, 1919190, 6, 13530, ....

The sequence of integers $$B_{2n} + \sum_{(p-1)|2n} \frac1p$$ is
 * 1, 1, 1, 1, 1, 1, 2, -6, 56, -528, 6193, -86579, 1425518, -27298230, ....

Proof
A proof of the Von Staudt–Clausen theorem follows from an explicit formula for Bernoulli numbers which is:
 * $$ B_{2n}=\sum_{j=0}^{2n}{\frac{1}{j+1}}\sum_{m=0}^{j}{(-1)^{m}{j\choose m}m^{2n}} $$

and as a corollary:
 * $$ B_{2n}=\sum_{j=0}^{2n}{\frac{j!}{j+1}}(-1)^jS(2n,j) $$

where $S(n,j)$ are the Stirling numbers of the second kind.

Furthermore the following lemmas are needed:

Let $p$ be a prime number; then

1. If $p – 1$ divides $2n$, then


 * $$ \sum_{m=0}^{p-1}{(-1)^m{p-1\choose m} m^{2n}}\equiv{-1}\pmod p. $$

2. If $p – 1$ does not divide $2n$, then


 * $$ \sum_{m=0}^{p-1}{(-1)^m{p-1\choose m} m^{2n}}\equiv0\pmod p. $$

Proof of (1) and (2): One has from Fermat's little theorem,


 * $$ m^{p-1} \equiv 1 \pmod{p} $$

for $m = 1, 2, ..., p – 1$.

If $p – 1$ divides $2n$, then one has
 * $$ m^{2n} \equiv 1 \pmod{p} $$

for $m = 1, 2, ..., p – 1$. Thereafter, one has


 * $$ \sum_{m=1}^{p-1} (-1)^m \binom{p-1}{m} m^{2n} \equiv \sum_{m=1}^{p-1} (-1)^m \binom{p-1}{m} \pmod{p},$$

from which (1) follows immediately.

If $p – 1$ does not divide $2n$, then after Fermat's theorem one has


 * $$ m^{2n} \equiv m^{2n-(p-1)} \pmod{p}. $$

If one lets $&wp; = &lfloor; 2n / (p – 1) &rfloor;$, then after iteration one has


 * $$ m^{2n} \equiv m^{2n-\wp(p-1)} \pmod{p} $$

for $m = 1, 2, ..., p – 1$ and $0 < 2n – &wp;(p – 1) < p – 1$.

Thereafter, one has


 * $$ \sum_{m=0}^{p-1} (-1)^m \binom{p-1}{m} m^{2n} \equiv \sum_{m=0}^{p-1} (-1)^m \binom{p-1}{m} m^{2n-\wp(p-1)} \pmod{p}. $$

Lemma (2) now follows from the above and the fact that $S(n,j) = 0$ for $j > n$.

(3). It is easy to deduce that for $a > 2$ and $b > 2$, $ab$ divides $(ab – 1)!$.

(4). Stirling numbers of the second kind are integers.

Now we are ready to prove the theorem.

If $j + 1$ is composite and $j > 3$, then from (3), $j + 1$ divides $j!$.

For $j = 3$,


 * $$ \sum_{m=0}^{3} (-1)^m \binom{3}{m} m^{2n} = 3 \cdot 2^{2n} - 3^{2n} - 3 \equiv 0 \pmod{4}. $$

If $j + 1$ is prime, then we use (1) and (2), and if $j + 1$ is composite, then we use (3) and (4) to deduce


 * $$ B_{2n} = I_n - \sum_{(p-1)|2n} \frac{1}{p}, $$

where $I_{n}$ is an integer, as desired.