Section 20.3 Digging Deeper and Finding Limits

Subsection 20.3.1 Moving toward a proof
To be more in line with our previous notation, we will say thatxxxxxxxxxx
def _(n=(15,list(range(2,50)))):
viewsize=n+1
g(x)=1/x
P=Graphics()
P += plot(n*g,(x,0,n+1))
P += plot(2*g,(x,0,n+1), linestyle="--")
if n>7:
P += plot((n-5)*g,(x,0,n+1),linestyle="--")
grid_pts = [[i,j] for i in [1..viewsize] for j in [1..viewsize]]
P += points(grid_pts,rgbcolor=(0,0,0),pointsize=2)
lattice_pts = [coords for coords in grid_pts if (coords[0]*coords[1]<=n)]
P += points(lattice_pts, rgbcolor = (0,0,1),pointsize=20)
show(P,ymax=viewsize,aspect_ratio=1)

We can think of it as
– adding up the lattice points along each hyperbola.We can think of it as
or adding up the lattice points in each vertical column.
Definition 20.3.3.
Throughout this text we use

All the areas where the red squares are above the hyperbola add up to less than
because they are all 1 in width or less, and do not intersect vertically (they stack, as it were).Similarly, all the areas where the hyperbola is higher add up to less than
because they are all 1 in height or less, and are horizontally non-intersecting.
xxxxxxxxxx
def _(n=(8,list(range(2,25)))):
viewsize=n+1
g(x)=1/x
P1 = Graphics()
P1 += plot(n*g,(x,0,n), ymax=viewsize, aspect_ratio=1, xmin=0, xmax=n+1)
P1 += plot(piecewise([[(j,j+1),floor(n/j)] for j in [1..n-1]]), (x,1,n), fill=n/x,fillalpha=.3, linestyle='') + plot(1,(x,n,n+1),fill=True, fillalpha=.3,linestyle='')
P2 = plot(n*g,(x,0,n+1), ymax=viewsize, aspect_ratio=1)
P2 += plot(n*g,(x,1,n),fill=True,fillalpha=.3)
grid_pts = [[i,j] for i in [1..viewsize] for j in [1..viewsize]]
P1 += points(grid_pts,rgbcolor=(0,0,0),pointsize=2)
P2 += points(grid_pts,rgbcolor=(0,0,0),pointsize=2)
lattice_pts = [coords for coords in grid_pts if (coords[0]*coords[1]<=n)]
P1 += points(lattice_pts, rgbcolor = (0,0,1),pointsize=20)
P2 += points(lattice_pts, rgbcolor = (0,0,1),pointsize=20)
squares=[line([[k,l],[k+1,l],[k+1,l-1],[k,l-1],[k,l]], rgbcolor=(1,0,0)) for [k,l] in lattice_pts]
for object in squares:
P1 += object
P2 += object
show(graphics_array([P1,P2]))
pretty_print(html(r"Error between sum of $\tau(n)$ up through $%s$, and $%s\log(%s)$"%(n,n,n)))
Fact 20.3.5.
The error
is a positive real number less than minus a (different positive real) number less thanSo the error is certainly
(less than some multiple of as gets huge).-
So, the error in the average is less than some constant as
gets huge! I.e.,
(Recall we use


Subsection 20.3.2 Getting a handle on error
To answer this, we will try one more geometric trick.
The ones on the line
The lattice points above the line and below the hyperbola.
The lattice points to the right of the line and below the hyperbola.
xxxxxxxxxx
def _(n=(8,list(range(2,25)))):
viewsize=n+1
g(x)=1/x
P=Graphics()
P += plot(n*g,(x,0,n+1))
P += plot(2*g,(x,0,n+1),linestyle="--")
if n>7:
P += plot((n-5)*g,(x,0,n+1),linestyle="--")
grid_pts = [[i,j] for i in [1..viewsize] for j in [1..viewsize]]
P += points(grid_pts, rgbcolor=(0,0,0),pointsize=2)
lattice_pts = [coords for coords in grid_pts if (coords[0]*coords[1]<=n)]
P += points(lattice_pts, rgbcolor = (0,0,1),pointsize=20)
P += plot(x,(x,0,viewsize), linestyle="--",rgbcolor=(0,0,0))
show(P,ymax=viewsize,aspect_ratio=1)
Subsection 20.3.3 The end of the story
We're almost at the end of the story! It's been a while since we explored the long-term average of
Definition 20.3.10.
The number
Remark 20.3.11.
You have almost certainly never heard of this number, but it is very important. There is even an entire book, by Julian Havil [E.4.15] about this number. It's a pretty good book, in fact!
Among other crazy properties,
Most baffling of all,
