Section 20.1 Sums of Squares, Once More
Subsection 20.1.1 Errors, not just limits
As it happens, we can say something far more specific than just this limit. Recall one of the intermediate steps in our proof.xxxxxxxxxx
def r2(n):
n = prime_to_m_part(n,2)
F = factor(n)
ret = 4
for a,b in F:
if a%4==3:
if b%2==1:
return 0
else:
n = prime_to_m_part(n,a)
else:
ret = ret * (b+1)
return ret
def L(n):
ls = []
out = 0
for i in range(1,n+1):
out += r2(i)
ls.append((i,out/i))
return ls
xxxxxxxxxx
def _(n=100):
P = line(L(n))
P += plot(pi+pi*sqrt(2)/sqrt(x),x,3,n,color='red')
P += plot(pi-pi*sqrt(2)/sqrt(x),x,3,n,color='red')
P += plot(pi,x,3,n,color='red',linestyle='--')
show(P)

Subsection 20.1.2 Landau notation
It turns out there is a nice notation for how ‘big’ an error is.Definition 20.1.2. Big Oh.
We say that
This is known as Landau notation.
Example 20.1.3.
The average number of representations of an integer as a sum of squares is
It is unknown in this case just how small the error term really is. In 1906 it was shown that it is

It is also known that the error term is not as close as
Question 20.1.5.
What is the “average” number of divisors of a positive integer? What is the “average” sum of divisors of a positive integer?