Aperiodical guest author Andrew Taylor writes about an intriguing piece of number theory which turns out to also be something else.
How many ways are there of writing some natural number
I don’t want an answer for some particular
We’re going to be fairly generous about what we count here, so for
So what does that mess of zeroes and hundreds average out at?
Take a guess, there’s no harm in it. Or you can compute it fairly easily — it converges after a few thousand values of
First we need to be a little more formal: we can’t directly take the average over all the natural numbers because there are infinitely many of them — but we can take the average over a finite number
where
But that’s the same as saying “how many ways can you make
And that’s the same as saying “out of all possible pairs of numbers, how many of them make a number less than or equal to
Because we can plot all possible pairs of numbers on a graph

And by Pythagoras, the ones whose squares sum to

And since the dots are in a square grid with a spacing of exactly

And the area of the circle is obviosuly
Which means that for large values of
So the average number of ways we can make a natural number
And that rather blew my mind.
Although in my case, my mind was blown kind of backwards, because my first experience of this cute quirk of mathematics was this post on Mastodon:
“Every now and again one comes across an astounding result that closely relates two foreign objects which seem to have nothing in common. Who would suspect, for example, that on the average, the number of ways of expressing a positive integer
as a sum of two integral squares, , is ?” — Ross Honsberger, Mathematical Gems III, 1977
This was presented with no context or proof, so I should thank Colin for providing the latter. If you fancy joining in with this frustrating but ultimately rewarding chatter, then Christian runs a maths-focussed server at the nearly unpronouncable mathstodon.xyz.
Very nice! Happy belated pi day…
I should have guessed it was probably pi, given this was posted on 3/14…