[math-fun] Number of sums of squares ...
I recently saw the following claim: "On the average, the number of ways of expressing a positive integer n as a sum of two integral squares, x^2 + y^2 = n, is pi" Can anyone confirm or deny this? Thanks. Colin -- Some of you may have had occasion to run into mathematicians and to wonder therefore how they got that way, ... -- Tom Lehrer
I'm sure the argument goes like this. Pick a large integral value of R. The number of (x,y) points within the circle of radius R centered at the origin is approximately pi R^2 (and tends to pi R^2 as R tends to infinity). There are about R^2 distinct values between 0 and R^2 (the maximum of x^2+y^2 within that circle). Thus, the average number of points for each such value is pi R^2 / R^2 which is just pi. On Wed, Jul 18, 2018 at 12:52 PM Colin Wright <math_fun@solipsys.co.uk> wrote:
I recently saw the following claim:
"On the average, the number of ways of expressing a positive integer n as a sum of two integral squares, x^2 + y^2 = n, is pi"
Can anyone confirm or deny this?
Thanks.
Colin -- Some of you may have had occasion to run into mathematicians and to wonder therefore how they got that way, ... -- Tom Lehrer
_______________________________________________ math-fun mailing list math-fun@mailman.xmission.com https://mailman.xmission.com/cgi-bin/mailman/listinfo/math-fun
-- -- http://cube20.org/ -- http://golly.sf.net/ --
On 18/07/2018 20:51, Colin Wright wrote:
I recently saw the following claim:
"On the average, the number of ways of expressing a positive integer n as a sum of two integral squares, x^2 + y^2 = n, is pi"
The average number of ways to express numbers from 1 to N as sums of two squares = 1/N times the total number of ways to express numbers from 1 to N as sums of two squares = 1/N times the total number of (x,y) for which 0 < x^2+y^2 <= N = 1/N times (the total number of (x,y) inside the circle X^2 + Y^2 = N, minus 1) = 1/N times (the area inside the circle X^2 + Y^2 = N, + O(N)) = 1/N times (the area inside the circle X^2 + Y^2 = sqrt(N)^2, + O(N)) = 1/N ( pi sqrt(N)^2 + O(N)) = pi + O(1/N). -- g
Without loss of generality x >= y, therefore: x^2 - y^2 = n - 2y^2 can be written in the same number of ways, pi on average. The left hand side is a factorization of n - 2y^2: (x+y)(x-y) = n - 2y^2 So there are pi (perhaps trivial) factorizations of n - 2y^2, on average, for all the varying x and y pairs (i.e. not fixed y). Really? On 7/18/18 12:51 , Colin Wright wrote:
I recently saw the following claim:
"On the average, the number of ways of expressing a positive integer n as a sum of two integral squares, x^2 + y^2 = n, is pi"
Can anyone confirm or deny this?
Thanks.
Colin
participants (4)
-
Andres Valloud -
Colin Wright -
Gareth McCaughan -
Tomas Rokicki