von Staudt-Clausen theorem (source code)

= von Staudt-Clausen theorem
{c}

For $n\ge1$, the <von Staudt-Clausen theorem> states
$$
B_{2n}+\sum_{\substack{p\text{ prime}\\p-1\mid2n}}\frac1p\in\mathbb Z.
$$
Consequently the positive denominator of the <Bernoulli number> $B_{2n}$ in lowest terms is exactly the squarefree product of the <primes> satisfying $p-1\mid2n$. This gives its denominator without computing its numerator.<NIST Digital Library of Mathematical Functions>[§24.10, von Staudt-Clausen theorem]{ref}

For $B_4$, the relevant <primes> are $2,3,5$. Their reciprocals sum to $31/30$, and $B_4=-1/30$, so the displayed expression is $1$. The theorem concerns even positive indices; $B_1=-1/2$ is handled separately. It explains the recurring small prime factors in denominators of formulas for sums of powers.