Section 18.2 Three Questions, Again
Definition 18.2.1.
Let
Example 18.2.2.
For instance,
Remember, we count all solutions, positive or negative, and in any particular order possible, in determining the value of
Subsection 18.2.1 Formulas
In Exercise 13.7.7, we saw thatFact 18.2.3.
Write the prime factorization of
where we write primes of the form
Proof.
Unfortunately, it turns out that every single proof of this is not very short. They all either go into some detail regarding factorization of Gaussian integers (recall our allusion to this in Fact 14.1.8), or they do some lengthy divisibility and congruence analysis. So we will skip the proof.
Sage note 18.2.4. Review quiz.
You can use various tools we've already seen to compute this with Sage, such as factoring and multiplication. Try it!
xxxxxxxxxx
Subsection 18.2.2 Relations
We just saw an impressive relation among values ofExample 18.2.5.
Indeed, now that we have a formula, we can compute this.
-
For instance,
because both sides are zero!
For the same reason,
-
On the other hand,
Similarly,
In these examples, the inputs are relatively prime but it doesn't multiply. What might still be true? See Exercise Group 18.3.1–2.
Sage note 18.2.6. Explore here.
Feel free to explore here!
xxxxxxxxxx
Subsection 18.2.3 Limits (and summation)
In Subsection 18.1.3 we saw that (for
xxxxxxxxxx
def _(n=(5,[1..100])):
viewsize=ceil(math.sqrt(n))+2
a=(math.sqrt(n)+1/math.sqrt(2))^2
b=(math.sqrt(n)-1/math.sqrt(2))^2
g(x,y) = x^2+y^2
P=Graphics()
P += implicit_plot(g-n, (-viewsize,viewsize), (-viewsize,viewsize), plot_points = 200)
P += implicit_plot(g-a, (-viewsize,viewsize), (-viewsize,viewsize), linestyle='--',plot_points = 200)
P += implicit_plot(g-b, (-viewsize,viewsize), (-viewsize,viewsize), linestyle='--',plot_points = 300)
grid_pts = [[i,j] for i in [-viewsize..viewsize] for j in [-viewsize..viewsize]]
P += points(grid_pts,rgbcolor=(0,0,0),pointsize=2)
lattice_pts = [coords for coords in grid_pts if (coords[1]^2+coords[0]^2<=n)]
P += points(lattice_pts, rgbcolor = (0,0,1),pointsize=20)
squares=[line([[k-1/2,l-1/2], [k+1/2,l-1/2],[k+1/2,l+1/2], [k-1/2,l+1/2],[k-1/2,l-1/2]], rgbcolor=(1,0,0)) for [k,l] in lattice_pts]
for object in squares:
P += object
show(P, figsize = [5,5], xmin = -viewsize, xmax = viewsize, ymin = -viewsize, ymax = viewsize, aspect_ratio=1)
pretty_print(html("There are $%s$ boxes with a circle of radius $%s$"%(len(squares),math.sqrt(n))))
pretty_print(html("The ratio of the area of boxes to the square of the radius is $\\approx%s$"%(len(squares)/(math.sqrt(n)^2))))
Fact 18.2.8.
Observe that the boxes neither cover nor are covered by the circle in question. However, we can say two things about them.
These boxes will entirely cover a disk of radius
minus half the diagonal length of the boxes, namely which is the inner circle above.Likewise, they are completely contained in a disk of radius
plus half the diagonal length of the boxes.
Proof.
Geometry.
First, the limit as
goes to of the lower and upper bounds with each of these inequalities exists. In fact, the limit of the bounds in both cases is-
Then, the beloved squeeze theorem from calculus implies that
Finally, note that
so its presence or absence will not affect the average in the limit at all.
Fact 18.2.9.
The average number of representations of a positive integer as a sum of squares is
But it's true. And there's more to come.WHAT?!