I had to figure it out... and I think I did. It took me a few tweets to fumble my way to the answer.

A vague idea:

> There must be a purely gamma-function-theoretic way to understand this integrality, but it would be really fun to have an argument based on harmonic analysis on the spheres (decomposing the distance function into harmonics, say), connecting it to division algebras.

A better idea:

> For example, for the spheres that are groups (\$$S^0, S^1\$$ and \$$S^3\$$) we can use Peter-Weyl to decompose \$$L^2(S^n)\$$ as a sum of reps \$$R \otimes R^\ast\$$ where \$$R\$$ ranges over all irreps of that group. The powers of the distance function live in there.

A better idea:

> Oh - it's the *square* of the distance function that's a polynomial on \$$\mathbb{R}^n\$$, and thus has a manageable expression in terms of spherical harmonics when we restrict it to the sphere. This kinda explains why even moments of the distance function are nicer.

An actual inspiration:

> I bet the in the cases of spheres that are groups, the \$$2n\$$th integer Greg computed above is the dimension of the trivial part of the \$$n\$$th tensor power of a certain rep of that group!

A concrete plan of attack:

> I conjecture the square of the distance function is the character of a certain rep \$$X\$$. This implies that the \$$2n\$$th power of the distance function is the character of \$$X^{\otimes n}\$$. The integral of this function over the sphere (the group) is then the dim of the trivial subrep.

> And thus it must be an integer! - if my conjecture is true. But the conjecture can be checked on a case-by-case basis, since we just need to understand the reps of \$$S^0 = \mathbb{Z}/2, S^1 = \mathrm{U}(1)\$$ and \$$S^3 = \mathrm{SU}(2)\$$, and express the distance-squared function as a character of some rep.

A correction:

> Hmm, it's not quite that simple. For \$$S^0 \subset \mathbb{R}\$$ the distance-squared function is \$$0\$$ at the identity \$$+1\$$ and \$$4\$$ at -1. This isn't a character of a rep, since it vanishes at the identity. But it's a difference of characters of reps - or a character of a 'virtual rep'. Probably enough.

The rest of the details should be straightforward.