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,
i.e. n=x^2 + y^2
Evaluate the expected value
Yes, this one did surprise me a little.
I started using circles to try to do the calculation, thinking that it might be the average number of lattice points in a circle of radius sqrt(n).
But I could not convince myself that this was right, so I calculated the first several, which were:
n number of ways
1 4 (since zeroes and negatives are allowed)
and then found the sequence in oeis, A004018
The first 10,000 values are listed here
And the cumulative average of the first 483 was calculated in Excel. The last 10 terms were all somewhere between 3.095 and 3.145.
I suspect that the average is converging to Pi. Not a total surprise, but a very satisfying result. It turns out that my first thought was right, and now I see why.
Nice problem, Ady!
Edited on September 5, 2015, 1:04 pm