Find the average number of ways we can express a natural number 𝑛 as the sum of two squares

The average number of ways we can express a natural number 𝑛 as the sum of two squares…

We are not looking for an answer for some particular 𝑛. We are not looking for a general formula.

We just want to know… on an average what is this equal to.

We’re going to be fairly generous about what we count here,

So for 𝑛=1 -> there are four ways:

0^2+1^2,

0^2+(βˆ’1)^2,

1^2+0^2

and (βˆ’1)^2+0^2.

There are another four solutions for 𝑛=2:

But then there are no ways to express 3 as the sum of the squares of two natural numbers.

In fact (I claim, with exactly zero formal proof) most numbers can’t be expressed like this β€” but then there are 160 ways to express 4,005,625 as the sum of the squares of two natural numbers.

You will find however that there are 3,184,193 un-expressable numbers along the way.

So what does that mess of zeroes and hundreds average out at ?


The answer is 3.14159.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

1 solution

Mark Hennings
Mar 20, 2019

It is a property of the sum of squares function r 2 ( n ) r_2(n) that βˆ‘ k = 1 n r 2 ( k ) = Ο€ n + O ( n ) n β†’ ∞ \sum_{k=1}^n r_2(k) \; = \; \pi n + O(\sqrt{n}) \hspace{2cm} n \to \infty and hence lim ⁑ n β†’ ∞ 1 n βˆ‘ k = 1 n r 2 ( k ) = Ο€ \lim_{n \to \infty}\frac{1}{n}\sum_{k=1}^n r_2(k) \; = \; \boxed{\pi} which is the nearest thing we can get to calculating the expected value of r 2 r_2 .

0 pending reports

Γ—

Problem Loading...

Note Loading...

Set Loading...