# 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 Karl von Staudt (1840) and Thomas Clausen (1840).

Specifically, if n is a positive integer and we add 1/p to the Bernoulli number B2n for every prime p such that p − 1 divides 2n, we obtain an integer, i.e., ${\displaystyle B_{2n}+\sum _{(p-1)|2n}{\frac {1}{p}}\in \mathbb {Z} .}$

This fact immediately allows us to characterize the denominators of the non-zero Bernoulli numbers B2n as the product of all primes p such that p − 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, ... (sequence A002445 in the OEIS).

## Proof

A proof of the Von Staudt–Clausen theorem follows from an explicit formula for Bernoulli numbers which is:

${\displaystyle 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:

${\displaystyle B_{2n}=\sum _{j=0}^{2n}{\frac {j!}{j+1}}(-1)^{j}S(2n,j)}$

where ${\displaystyle 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,

${\displaystyle \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,

${\displaystyle \sum _{m=0}^{p-1}{(-1)^{m}{p-1 \choose m}m^{2n}}\equiv 0{\pmod {p}}}$

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

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

for ${\displaystyle m=1,2,...,p-1}$.
If p-1 divides 2n then one has,

${\displaystyle m^{2n}\equiv 1{\pmod {p}}}$

for ${\displaystyle m=1,2,...,p-1}$.
Thereafter one has,

${\displaystyle \sum _{m=1}^{p-1}{(-1)^{m}{p-1 \choose m}m^{2n}}\equiv \sum _{m=1}^{p-1}{(-1)^{m}{p-1 \choose m}}{\pmod {p}}}$

from which (1) follows immediately.
If p-1 does not divide 2n then after Fermat's theorem one has,

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

If one lets ${\displaystyle \wp =[{\frac {2n}{p-1}}]}$ (Greatest integer function) then after iteration one has,

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

for ${\displaystyle m=1,2,...,p-1}$ and ${\displaystyle 0<2n-\wp (p-1).
Thereafter one has,

${\displaystyle \sum _{m=0}^{p-1}{(-1)^{m}{p-1 \choose m}m^{2n}}\equiv \sum _{m=0}^{p-1}{(-1)^{m}{p-1 \choose 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 second kind are integers.

Proof of the theorem: Now we are ready to prove Von-Staudt Clausen theorem,
If j+1 is composite and j>3 then from (3), j+1 divides j!.
For j=3,

${\displaystyle \sum _{m=0}^{3}{(-1)^{m}{3 \choose 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:

${\displaystyle B_{2n}=I_{n}-\sum _{(p-1)|2n}{\frac {1}{p}}}$

where ${\displaystyle I_{n}}$ is an integer, which is the Von-Staudt Clausen theorem.[1][2]