The main reason I know for the appearance of Bernoulli numbers is the one Henry Cohn already explained: we'd like to invert the difference operator $e^D - 1$, so we'd like to expand $1/(e^D - 1)$ as a Taylor series.   But $1/(e^x - 1)$ doesn't have a Taylor series, because it has a pole at the origin.  It has a perfectly nice Laurent series, but just to make things more obscure people prefer to discuss the Taylor series of $x/(e^x - 1)$.  And the coefficients of this are called Bernoulli numbers.

I understand how <a href = "math.ucr.edu/home/baez/qg-winter2004/zeta.pdf">Bernoulli numbers are used to compute $\sum_{i=1}^n i^k$</a> and how they <a href = "math.ucr.edu/home/baez/qg-winter2004/zeta2.pdf">show up in formulas for the Riemann zeta function</a>.

However, Alain Connes loses me here:

* Alain Connes, Andre Lichnerowicz and Marcel Paul Schutzenberger, A Triangle of Thoughts, AMS, Providence, 2000.

He points out that if $H$ is the Hamiltonian for some sort
of particle in a box and $\beta$ is the inverse temperature,

$$ 1/(1 - e^{-\beta H}) = 1 + e^{-\beta H} + e^{-2 \beta H} + \cdots $$

is the operator you take the trace of to get the partition
function for a collection of an arbitrary number of particles of
this sort. And he claims that pondering this explains all the
appearances of $x/(1 - e^x)$ and the Bernoulli numbers in topology!

Does anyone understand that?  I imagine he's hinting at some relation between characteristic classes, the heat equation, the Laplacian on differential forms, and things like that.  But I've never understood how these pieces are supposed to fit together.

And here's something that remains more mysterious to me.  The paper by Kervaire and Milnor has a cool formula for the order of the group of smooth structures on the $(4n-1)$-sphere for $n > 1$.  It's:
 
$$2^{2n-4} (2^{2n-1} - 1) P(4n-1) B(n) a(n) / n$$

where:

$P(k)$ is the order of the $k$th stable homotopy group of spheres

$B(k)$  is the $k$th Bernoulli number, in the sequence 1/6, 1/30, 1/42, 1/30, 5/66, 691/2730, 7/6, ...

$a(k)$   is 1 or 2 according to whether k is even or odd

How do the Bernoulli numbers weasel their way into this game?