Section13.8Exercises

  1. Prove that if \(n\equiv 3\text{ mod }(4)\), then \(n\) cannot be written as a sum of two squares.
  2. Show that if \(n\equiv 7\text{ mod (8)}\), then \(n\) cannot be written as a sum of three perfect squares.
  3. Find two numbers that can be written as a sum of three squares in two different ways (where different really means different, not \(1^2+0^2+0^2=0^2+1^2+0^2\)).
  4. Find as many integers \(n\) as possible which are only writeable as a sum of squares via \(n=a^2+a^2=2a^2\), i.e. \(n\) is not writeable as a sum of distinct squares.
  5. Verify the Brahmagupta-Fibonacci identity by hand (i.e. write all the algebra out).
  6. Let \(r_2(n)\) be the number of different ways to write \(n\) as a sum of two squares, where every different way is counted. For instance, \[r_2(2)=4\text{ because }(-1,1),(-1,-1),(1,1),(1,-1)\text{ all work.}\] Prove that \[r_2\left(2^n\right)=4\text{ for all }n\; .\]
  7. Let \(N\) be odd, and let \(N=a^2+b^2\) and \(n=c^2+d^2\), where the pairs \((a,b)\) and \((c,d)\) are both positive and not the same or just switched in order. Verify the following:
    • It's okay to assume that \(a\) and \(c\) are odd and \(b\) and \(d\) are even.
    • If this is the case, show that \(k=gcd(a-c,b-d)\) and \(n=gcd(a+c,b+d)\) are both even.
    • Then show that \(\frac{a-c}{k}=\frac{b+d}{n}\) and \(\frac{b-d}{k}=\frac{a+c}{n}\).
  8. Pick four random (to you) three digit numbers which are not of the form \(4k+3\) and decide whether they are a sum of two squares without using Sage.
  9. Pick two of those numbers and write them in all possible ways as a sum of two squares.
  10. Show a positive integer \(k\) is the difference of two squares if and only if \(k\not \equiv 2\) mod (4).
  11. Prove that if \(n\equiv 12\) mod (16), show that \(n\) cannot be written as a sum of two squares.
  12. Is there any congruence condition modulo \(6\) for which a number cannot be written as a sum of two squares?
  13. Referring to the proof of the main theorem: Check that the pictures you get from some other primes with these lattices really work.
  14. Check every piece of the Zagier proof:
    • The set \(S\) is finite. Try figuring out what \(S\) is for \(p=5\) or \(p=13\), the smallest such primes.
    • Each \((x,y,z)\) has exactly one of the three things to go to.
    • The function in question is an involution. That is, if you take the output and apply the function a second time, you get your original \((x,y,z)\) back (this is a little tougher).
    • If \((x,y,z)\) goes to \((x,y,z)\) then it turns out that \((x,y,z)=(1,1,\frac{p-1}{4})\) (you will probably need to use the definition of \(S\) for this, and remember that we assume \(p\equiv 1\) mod (4)).
    • That if the map \((x,y,z)\to (x,z,y)\) has a point which is fixed (the output is same as input) then this, combined with the definition of \(S\), means that \(p\) is writeable as the sum of two squares.