Math 567 -- Elementary Number Theory: Difference between revisions

From UW-Math Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
 
(50 intermediate revisions by the same user not shown)
Line 3: Line 3:
Elementary Number Theory'''
Elementary Number Theory'''


TR 9:30-10:45, Van Vleck B119
MWF 1:20-2:10, Van Vleck B119


'''Professor:'''  [http://www.math.wisc.edu/~andreic/ Andrei Caldararu] (andreic@math.wisc.edu)
'''Professor:'''  [http://www.math.wisc.edu/~andreic/ Andrei Caldararu] (andreic@math.wisc.edu)
''Office Hours:'' Tuesdays 1:30-3:00, Van Vleck 605.


'''Grader:'''  Shouwei Hui (shui5@wisc.edu)
''Office Hours:'' Wednesdays 2:30-3:30, Van Vleck 605.  
''Office Hours:'' Wednesdays 3-4pm, Van Vleck 903.


Math 567 is a course in elementary number theory, aimed at undergraduates majoring in math or other quantitative disciplines.  A general familiarity with abstract algebra at the level of Math 541 will be assumed, but students who haven't taken 541 are welcome to attend if they're willing to play a little catchup.  We will be using William Stein's new (and cheap) textbook [http://www.amazon.com/Elementary-Number-Theory-Computational-Undergraduate/dp/0387855246 Elementary Number Theory:  Primes, Congruences, and Secrets], which emphasizes computational approaches to the subject.  If you don't need a physical copy of the book, [http://www.williamstein.org/ent/ it is available as a free legal .pdf.]  We will be using the (free, public-domain) mathematical software [http://www.sagemath.org/ SAGE], developed largely by Stein, as an integral component of our coursework.  There is a [http://www.sagemath.org/pdf/SageTutorial.pdf useful online tutorial.]  You can download SAGE to your own computer or [http://www.sagenb.org use it online].
'''Grader:'''  Yifan Peng, email: peng64@wisc.edu
 
''Office Hours:'' TBA.
 
Math 567 is a course in elementary number theory, aimed at undergraduates majoring in math or other quantitative disciplines.  A general familiarity with abstract algebra at the level of Math 541 will be assumed, but students who haven't taken 541 are welcome to attend if they're willing to play a little catchup.  We will be using William Stein's new (and cheap) textbook [http://www.amazon.com/Elementary-Number-Theory-Computational-Undergraduate/dp/0387855246 Elementary Number Theory:  Primes, Congruences, and Secrets], which emphasizes computational approaches to the subject.  If you don't need a physical copy of the book, [http://www.williamstein.org/ent/ it is available as a free legal .pdf.]  We will be using the (free, public-domain) mathematical software [http://www.sagemath.org/ SAGE], developed largely by Stein, as an integral component of our coursework.  There is a [http://doc.sagemath.org/pdf/en/tutorial/SageTutorial.pdf useful online tutorial.]  You can download SAGE to your own computer or [http://www.sagenb.org use it online].


Topics include some subset of, but are not limited to: Divisibility, the Euclidean algorithm and the GCD, linear Diophantine equations, prime numbers and uniqueness of factorization. Congruences, Chinese remainder theorem, Fermat's "little" theorem, Wilson's theorem, Euler's theorem and totient function, the RSA cryptosystem, Rabin's encryption scheme, Diffie-Hellman key exchange protocol. Number-theoretic functions, multiplicative functions, Möbius inversion. Primitive roots and indices. Quadratic reciprocity and the Legendre symbol. Perfect numbers, Mersenne primes, Fermat primes. Pythagorean triples, Special cases of Fermat's "last" theorem. Fibonacci numbers. Continued fractions. Distribution of primes, discussion of prime number theorem. Primality testing and factoring algorithms.
Topics include some subset of, but are not limited to: Divisibility, the Euclidean algorithm and the GCD, linear Diophantine equations, prime numbers and uniqueness of factorization. Congruences, Chinese remainder theorem, Fermat's "little" theorem, Wilson's theorem, Euler's theorem and totient function, the RSA cryptosystem, Rabin's encryption scheme, Diffie-Hellman key exchange protocol. Number-theoretic functions, multiplicative functions, Möbius inversion. Primitive roots and indices. Quadratic reciprocity and the Legendre symbol. Perfect numbers, Mersenne primes, Fermat primes. Pythagorean triples, Special cases of Fermat's "last" theorem. Fibonacci numbers. Continued fractions. Distribution of primes, discussion of prime number theorem. Primality testing and factoring algorithms.


'''Course Policies:'''  Homework will be due on Thursdays.  It can be turned in late only with ''advance'' permission from your grader.  It is acceptable to use calculators and computers on homework (indeed, some of it will require a computer) but calculators are not allowed during exams.  You are encouraged to work together on homework, but writeups must be done individually.
'''Course Policies:'''  Homework will be due on Fridays.  It can be turned in late only with ''advance'' permission from your grader.  It is acceptable to use calculators and computers on homework (indeed, some of it will require a computer) but calculators are not allowed during exams.  You are encouraged to work together on homework, but writeups must be done individually.


Many of the problems in this course will ask you to prove things.  I expect proofs to be written in English sentences; the proofs in Stein's book are a good model for the level of verbosity I am looking for.  
Many of the problems in this course will ask you to prove things.  I expect proofs to be written in English sentences; the proofs in Stein's book are a good model for the level of verbosity I am looking for.  


'''Grading:'''  The grade in Math 567 will be composed of 50% homework, 25% midterm, 25% final.  The final exam date and location will be announced by the University and posted here when available.
'''Grading:'''  The grade in Math 567 will be composed of 50% homework, 25% midterm, 25% final.  The midterm will be on March 11, in class. The final exam will be on 5/8/2020, 7:45AM-9:45AM in room TBA.


'''Syllabus:'''  
'''Syllabus:'''  
(This may change as we see what pace works well for the course.  All section numbers refer to Stein's book.)
(This may change as we see what pace works well for the course.  All section numbers refer to Stein's book.)
   
   
* Sep 7 + Sep 11-15:  Prime numbers, prime factorizations, Euclidean algorithm and GCD (1.1-1.2)
* Jan 22-31:  Prime numbers, prime factorizations, Euclidean algorithm and GCD (1.1-1.2)
* Sep 18-22: The integers mod n, Euler's theorem, the phi function (2.1-2.2)
* Feb 3-7: The integers mod n, Euler's theorem, the phi function (2.1-2.2)
* Sep 25-29: Modular exponentiation, primality testing, and primitive roots (2.4-2.5)
* Feb 10-14: Modular exponentiation, primality testing, and primitive roots (2.4-2.5)
* Oct 2-6:  Public-key cryptography and RSA (3.1-3.4)
* Feb 17-21:  Public-key cryptography and RSA (3.1-3.4)
* Oct 9-13: Rabin's algorithm (not in the book); algebraic numbers  
* Feb 24-28: Rabin's algorithm (not in the book); algebraic numbers  
* Oct 16-20:  Quadratic reciprocity (4.1-4.4)
* Mar 2-6:  Quadratic reciprocity (4.1-4.4)
* Oct 23-27:  Finite and infinite continued fractions (5.1-5.3)
* Mar 9, Mar 13:  Finite and infinite continued fractions (5.1-5.3)
* Oct 31: ''Midterm exam''
* Mar 11: ''Midterm exam''
* Nov 2, Nov 6-10: Continued fractions and diophantine approximation (5.4-5.5)
* Mar 23-30: Continued fractions and diophantine approximation (5.4-5.5)
* Nov 13-17: Diophantine equations I:  Pell's equation and Lagrange's theorem
* Apr 1-3: Diophantine equations I:  Pell's equation and Lagrange's theorem
* Nov 21 and Nov 28-30: Elliptic curves (6.1-6.2)
* Apr 6-10: More diophantine equations, elliptic curves (6.1)
* Dec. 4-8: Applications of elliptic curves (6.3-6.4)
* Apr 13-17: Applications of elliptic curves (6.2-6.3)
* Dec. 12: advanced topic TBD: maybe additional discussion of cryptographic techniques?
* Apr 20-24: More applications of elliptic curves (6.4)
* Apr 27-May 1: advanced topic TBD: maybe additional discussion of cryptographic techniques?
 
'''Video Lectures:'''
Due to the university being transitioned to online teaching only, out lectures after spring break will need to be delivered online. I will post here videos for you to watch for the material we need to cover. Please watch them, and please give me feedback on how they could be improved.
 
* '''Lecture for Mar. 23''': watch it [https://mediaspace.wisc.edu/media/Math+567+March+23+Lecture/0_fkhvkxxv here].
* '''Lecture for Mar. 25''': watch it [https://mediaspace.wisc.edu/media/Math+567+March+25+lecture/0_qgkhpm19 here].
* '''Lecture for Mar. 27''': watch it [https://mediaspace.wisc.edu/media/March+27+Math+567+Lecture+Video/0_ajbr2ja0 here].
* '''Lecture for Mar. 30''': watch it [https://mediaspace.wisc.edu/media/March+30+Math+567+Lecture/0_yz44sw2c here].
* '''Lecture for Apr. 1''': watch it [https://mediaspace.wisc.edu/media/April+1+Math+567/0_e64bdfcf here].
* '''Lecture for Apr. 3''': watch it [https://mediaspace.wisc.edu/media/April+3+Math+567+Video/0_02rvfino here].
* '''Lecture for Apr. 6''': watch it [https://mediaspace.wisc.edu/media/April+6+Math+567+Video/1_jmm8r268 here].
* '''Lecture for Apr. 8''': watch it [https://mediaspace.wisc.edu/media/Group+law+elliptic/1_os81ndwu here].
* '''Lecture for Apr. 10''': watch it [https://mediaspace.wisc.edu/media/Pollard%27s+p-1+method+for+factoring/1_qyf08tuv here].
* '''Lecture for Apr. 13''': watch it [https://mediaspace.wisc.edu/media/Lenstra%2C+El+Gamal/1_848flqos here].
* '''Lecture for Apr. 15''': watch it [https://mediaspace.wisc.edu/media/Arithmetic+functions/1_y6anq1l0 here].
* '''Lecture for Apr. 17''': watch it [https://mediaspace.wisc.edu/media/Introduction+to+Mobius+inversion/1_e1w5jo4y here].
* '''Summary of the Apr. 20 lecture''': watch it [https://mediaspace.wisc.edu/media/Summary+of+Mobius+inversion/1_hx76ks7z here].


'''Homework:'''
'''Homework:'''
Homework is due at the beginning of class on the specified Thursday.  Typing your homework is not a requirement, but if you don't already know LaTeX I highly recommend that you learn it and use it to typeset your homework.  I will sometimes assign extra problems, which I will e-mail to the class list and include here.
Homework is due at the beginning of class on the specified Friday.  Typing your homework is not a requirement, but if you don't already know LaTeX I highly recommend that you learn it and use it to typeset your homework.  I will sometimes assign extra problems, which I will e-mail to the class list and include here.


* '''Sep 19''' (note this is Tuesday, not Thursday!): 1.1, 1.3, 1.5, 1.7 (use SAGE), 1.8, 1.14.
* '''Jan 31''': 1.1, 1.3, 1.5, 1.7 (use SAGE), 1.8, 1.14.
Problem A: Use SAGE to compute the number of x in [1..N] such that x^2 + 1 is prime, for N = 100, N = 1000, and N = 10000.  Let f(N) be the number of such x.  
Problem A: Use SAGE to compute the number of x in [1..N] such that x^2 + 1 is prime, for N = 100, N = 1000, and N = 10000.  Let f(N) be the number of such x.  


Line 54: Line 74:
Note that, despite the evident regularities you'll observe in this problem, we do not even know whether there are infinitely many primes of the form x^2 + 1!  You would become very famous if you proved this.
Note that, despite the evident regularities you'll observe in this problem, we do not even know whether there are infinitely many primes of the form x^2 + 1!  You would become very famous if you proved this.


<!--
* '''Feb 7''':  2.6 (the formulation of numerical evidence should be done by Sage if you've got Sage working, and by calculator if not; you can use an online tool like [http://primes.utm.edu/curios/includes/primetest.php this] to test whether a number is prime.)  2.8,2.9,2.11,2.12,2.14,2.19


* '''Sep 17''':  2.6 (the formulation of numerical evidence should be done by Sage if you've got Sage working, and by calculator if not; you can use an online tool like [http://primes.utm.edu/curios/includes/primetest.php this] to test whether a number is prime.)  2.8,2.9,2.11,2.12,2.14,2.19
* '''Feb 17''': 2.15, 2.18, 2.23, 2.26, 2.30.
.
* '''Sep 24''': 2.15, 2.16 (note that I presented part a) of this in class), 2.20, 2.23, 2.26.


Problem A:  Prove that if n=pq, with p,q prime, then n is not a Carmichael number.
Problem A:  Prove that if n=pq, with p,q prime, then n is not a Carmichael number.


* '''Feb 21''':  Book problems:  3.4, 3.5, 3.6


* '''Oct 1''':  
Problem A.  Prove that there are infinitely many primes p such that 2 is '''not''' a primitive root in Z/pZ. We break this up into steps.


Book problems:  2.31 (I will give a hint for this problem later in the week.) 3.4,3.5,3.6
Problem A.1Prove that, if x is an element of Z/nZ, then x^2 is not a primitive root.


Problem A.  Prove that there are infinitely many primes p such that 2 is '''not''' a primitive root in Z/pZ.  We break this up into steps.
Problem A.1.  Prove that, if x is an element of Z/nZ, then x^2 is not a primitive root.
Problem A.2.  Prove that there are infinitely many primes p such that 2 is a square in Z/pZ.  Hint:  suppose there are only finitely many such primes p_1, .. p_r, and define N = (p_1 .. p_r)^2 - 2.  Where can you go from here...?
Problem A.2.  Prove that there are infinitely many primes p such that 2 is a square in Z/pZ.  Hint:  suppose there are only finitely many such primes p_1, .. p_r, and define N = (p_1 .. p_r)^2 - 2.  Where can you go from here...?
Problem A.3.  Give a list of five primes p such that 2 is not a primitive root in Z/pZ (you can use the method of this proof or any other.)
Problem A.3.  Give a list of five primes p such that 2 is not a primitive root in Z/pZ (you can use the method of this proof or any other.)


Problem B.  Prove that 24 is the largest integer n such that every element of (Z/nZ)^* is a root of x^2-1.
Problem B.  Prove that 24 is the largest integer n such that every element of (Z/nZ)^* is a root of x^2-1.


* '''Oct 8''':
* '''Feb 28''': Problem A. Using p = 23 and q=31, show how to encrypt the message x=240 with Rabin's algorithm. Find all possible decryptions of your encrypted message.
 
* '''March 23''': 4.1 from the book.
 
Problem A.  Give a prime factorization of the Gaussian integer 7+9i.
Problem A.  Give a prime factorization of the Gaussian integer 7+9i.


Problem B. We showed in class that Z[i] satisfies a ''reduction theorem'':  if n and d are Gaussian integers, then there exists integers q and r such that n = qd + r and Norm(r) < Norm(d).  But (by contrast with the case of Z) this d may not be unique.  In some contexts it is better to be able to choose r uniquely, even if this means letting r have norm greater than Norm(d).   
Problem B. Read the notes from [http://www.math.ucsd.edu/~jverstra/Gaussian1.pdf here]. Note that Z[i] satisfies a ''reduction theorem'':  if n and d are Gaussian integers, then there exists integers q and r such that n = qd + r and Norm(r) < Norm(d).  But (by contrast with the case of Z) this d may not be unique.  In some contexts it is better to be able to choose r uniquely, even if this means letting r have norm greater than Norm(d).   


B.1. When d = 1+2i, show that, for each n in Z[i], there is a '''unique''' pair (q,r) in Z[i] such that n = qd+r and r is contained in the set {0,1,2,3,4}.  For instance, i can be written as i(1+2i) + 2, so we say i reduces to 2 mod (1+2i).
B.1. When d = 1+2i, show that, for each n in Z[i], there is a '''unique''' pair (q,r) in Z[i] such that n = qd+r and r is contained in the set {0,1,2,3,4}.  For instance, i can be written as i(1+2i) + 2, so we say i reduces to 2 mod (1+2i).
Line 89: Line 110:


C.1.  Compute phi(1+2i) and phi(3).
C.1.  Compute phi(1+2i) and phi(3).
C.2.  Prove that the value of phi(d) does not depend on the choice of S.
C.2.  Prove that the value of phi(d) does not depend on the choice of S.
C.3.  Prove that every n in Z[i] which is coprime to 3  satisfies n^phi(3) = 1 mod 3; that is, Euler's theorem holds in this case.  (You can prove this by direct computation; of course, if you want, you are welcome to prove that Euler's theorem holds for Z[i] in general, adapting the proof in Stein's book or the one we gave in class.)
C.3.  Prove that every n in Z[i] which is coprime to 3  satisfies n^phi(3) = 1 mod 3; that is, Euler's theorem holds in this case.  (You can prove this by direct computation; of course, if you want, you are welcome to prove that Euler's theorem holds for Z[i] in general, adapting the proof in Stein's book or the one we gave in class.)


*'''Oct 15:'''
*'''March 30'''
 
4.1


Problem A.  Express 50005 as the sum of two squares.
Problem A.  Express 50005 as the sum of two squares.


In the next two problems we denote by r(n) the number of ways to express n as the sum of two squares (i.e. the number of pairs (a,b) such that a^2 + b^2 = n.)  For instance, r(5) = 8 (as shown on the midterm.)
In the next two problems we denote by r(n) the number of ways to express n as the sum of two squares (i.e. the number of ordered pairs (a,b) such that a^2 + b^2 = n.)  For instance, r(5) = 8: (a,b) = (+/-1, +/-2) or (+/-2, +/-1).


Problem B.  Prove that, for any N, there exists an integer n such that r(n) > N.  (I.E., the function r(n) is ''unbounded.''
Problem B.  Prove that, for any N, there exists an integer n such that r(n) > N.  (I.E., the function r(n) is ''unbounded.'')


Problem C.  If you like Sage, write a short program in Sage to compute r(n) and compute the average of r(n) as n ranges from 1 to 1000.  Whether or not you like Sage, make a guess as to how this average would behave if you replaced "1000" by a larger and larger number.  (Feel free to ask the Sage-lovers what answer they got in the optional first part of the question.) Can you prove this guess is correct?
Problem C.  If you like Sage, write a short program in Sage to compute r(n) and compute the average of r(n) as n ranges from 1 to 1000.  Whether or not you like Sage, make a guess as to how this average would behave if you replaced "1000" by a larger and larger number.  (Feel free to ask the Sage-lovers what answer they got in the optional first part of the question.) Can you prove this guess is correct?
Line 106: Line 127:
Problem D.  We saw in class that the ring Z[sqrt(-5)] doesn't have unique factorization; 6 can be factored as 2*3 or (1+sqrt(-5))(1-sqrt(-5)).  In this problem, we will prove that Z[sqrt(-d)] fails to have unique factorization for EVERY odd d >= 5.  (Actually it's true for all d >= 5 but to make the proof manageable we'll restrict to the odd case.]
Problem D.  We saw in class that the ring Z[sqrt(-5)] doesn't have unique factorization; 6 can be factored as 2*3 or (1+sqrt(-5))(1-sqrt(-5)).  In this problem, we will prove that Z[sqrt(-d)] fails to have unique factorization for EVERY odd d >= 5.  (Actually it's true for all d >= 5 but to make the proof manageable we'll restrict to the odd case.]


D.1.  Show that (1+sqrt(-d)), (1-sqrt(-d)) and 2 are primes in Z[sqrt(-d)].
D.1.  Show that (1+sqrt(-d)), (1-sqrt(-d)) and 2 are irreducible in Z[sqrt(-d)].


D.2.  Now give an element of Z[sqrt(-d)] that has two distinct factorizations into primes. (Hint:  imitate the example we used for Z[sqrt(-5)].)
D.2.  Now give an element of Z[sqrt(-d)] that has two distinct factorizations into irreducibles. (Hint:  imitate the example we used for Z[sqrt(-5)].)
''Remark:''  The rings Z[sqrt(d)], where d is positive, are quite different -- here we believe that there are infinitely many with unique factorization, though this conjecture has remained unproved for many decades!
''Remark:''  The rings Z[sqrt(d)], where d is positive, are quite different -- here we believe that there are infinitely many with unique factorization, though this conjecture has remained unproved for many decades!


Problem E.  This is a version of the proof we gave in class that the Diophantine equation y^2 = x^3 - 1 has only the solution x=1,y=0.  In this problem we consider the equation y^2 = x^3 - 4.
*'''April 17'''


E.1. We can rewrite the equation as (y-2i)(y+2i) = x^3.  Show that, if the greatest common divisor of (y-2i) and (y+2i) is not 1, then both y-2i and y+2i are multiples of 1+i.
Book problems:  5.3,5.4,5.5
E.2. Prove that (y-2i) and (y+2i) are relatively prime if x is odd.
E.3. Using this argument, show that the only solutions to y^2 = x^3 - 4 with x odd is (11,5).
OPTIONAL:  Can you find the solutions where x is even?
 
*'''October 22'''
 
Book problems:  4.3, 4.4, 4.6 (quite involved, counts as two problems) 4.9a


Problem A:  We discussed in class the problem of studying which positive integers are the sum of two squares.  In this problem we prove that every element n of (Z/pZ) is the sum of two squares.  We argue as follows.  Let S be the set of squares in (Z/pZ), and let T be the set of (Z/pZ) consisting of all elements of the form n - x^2, for some x in (Z/pZ).
Problem A:  We discussed in class the problem of studying which positive integers are the sum of two squares.  In this problem we prove that every element n of (Z/pZ) is the sum of two squares.  We argue as follows.  Let S be the set of squares in (Z/pZ), and let T be the set of (Z/pZ) consisting of all elements of the form n - x^2, for some x in (Z/pZ).


A.1.  What is the size of S and of T?  Use this to show that S and T are not disjoint.
A.1.  What is the size of S and of T?  Use this to show that S and T are not disjoint.
A.2.  Given that S and T are not disjoint, prove that n is the sum of two squares.
A.2.  Given that S and T are not disjoint, prove that n is the sum of two squares.


Problem B.  Using the continued fraction expansion, find a solution to the Pell equation x^2 - 13 y^2 = 1.
Problem C.  Show that the modified Pell equation x^2 - 7y^2 = -1 has no solutions in integers x,y.  (Hint:  reduce the equation modulo a suitably chosen prime.)


*'''November 5'''
Problem D.  Stuffy Stirnweiss finished the 1945 season with a batting average of .3085443.  Using continued fractions, guess how many at-bats he had.  Tony Cuccinello had a batting average of .3084577.  Given that he had more than 200 and fewer than 600 at-bats, can you estimate the number of at-bats he had?
*'''April 24'''


Book problems:  5.3,5.4,5.5
Book problems 6.1, 6.2, 6.5, 6.10.  


Problem A. Let p = 58741Use the method of section 4.5 (discussed in class) to find an r in (Z/pZ) with r^2 = -1.
Problem A.1Pick two values of a in F_11 = Z/11Z (a not equal to 3), such that the equation y^2 = x^3+ax+1 defines an elliptic curve (i.e., it is smooth). For each such a, determine the number of points #E(F_11) and check that it falls inside the interval described in class.
Problem B. Use the result of problem A, and the method of section 5.7, to find integers a,b such that a^2 + b^2 = p.
Problem C.  As discussed in class, Stuffy Stirnweiss finished the 1945 season with a batting average of .3085443.  Using continued fractions, guess how many at-bats he had.  Tony Cuccinello had a batting average of .3084577.  Given that he had more than 200 and fewer than 600 at-bats, can you estimate the number of at-bats he had?
'''November 12'''


Problem A. When p is a prime congruent to 1 mod 4, prove that ((p-1)/2)! is a square root of -1 in (Z/pZ), along the lines described on the midterm (or by some other means, if you prefer.)
Problem A.2. The point P = (0,1) lies on each of these curves. For a =3 determine the order of P in the elliptic curve group, that is, find the smallest positive integer n such that nP = (infinity) -- the identity element in the group law.
Problem B. When p is a prime congruent to 3 mod 4, prove that ((p-1)/2)! is either 1 or -1 in (Z/pZ).  '''OPTIONAL:'''  Use sage to compute whether this factorial is 1 or -1 for many primes p.  Is there any pattern?  Does it seem to be 1 half the time and -1 half the time?  Note that I have no idea what the answer to this question is.
Problem C.  Using the continued fraction expansion, find a solution to the Pell equation x^2 - 13 y^2 = 1.
Problem D.  Show that the modified Pell equation x^2 - 7y^2 = -1 has no solutions in integers x,y.  (Hint:  reduce the equation modulo a suitably chosen prime.)
Problem E.  An ''ideal'' of Z[i] is a subset I of Z[i] which is closed under addition (if x and y are in I, then x+y is in I) and multiplication by Gaussian integers (if x is in i, then zx is also in I for every Gaussian integer z.)  The set of multiples of a Gaussian integer is always an ideal (you don't need to prove this.)  List all the ideals of Z[i] containing 2Z[i].  (Because such ideals satisfy conditions 1 and 2 from Monday's lecture, this list will be a subset of the list of 5 subgroups we computed in class.


We will not go any further with the notion of ideals in Math 567, but it is worth saying that the language of ideals is absolutely essential for the understanding of contemporary number theory, in a sense "making up for" the failure of unique factorization.
Problem B.  Show that if A+Bi is the cube of a Gaussian integer, then A^2 + B^2 is a perfect cube.


'''November 19'''
<!-- '''November 19'''


Problem A.  Using the method discussed in class (which is also the method of problem 4.6 in Stein, which in retrospect I think was too hard to assign with no preparation) find a nontrivial solution with y > 0 to the equation x^2 + 11y^2 = z^2.   
Problem A.  Using the method discussed in class (which is also the method of problem 4.6 in Stein, which in retrospect I think was too hard to assign with no preparation) find a nontrivial solution with y > 0 to the equation x^2 + 11y^2 = z^2.   
Problem B.  Let f(X) be the number of solutions of A^2 + B^2 = C^3 such that A^2, B^2, and C^3 are all at most X.  Use the heuristic described in class to explain why one might expect f(X) to grow more or less like X^{1/3}.
Problem B.  Let f(X) be the number of solutions of A^2 + B^2 = C^3 such that A^2, B^2, and C^3 are all at most X.  Use the heuristic described in class to explain why one might expect f(X) to grow more or less like X^{1/3}.


Problem C.  Show that if A+Bi is the cube of a Gaussian integer, then A^2 + B^2 is a perfect cube.


Do ONE of problem D1 and D2; D1 is for people who like Sage, D2 is for people who like proving things.
Do ONE of problem D1 and D2; D1 is for people who like Sage, D2 is for people who like proving things.
Line 233: Line 244:




OPTIONAL EXTRA:  Can you give an exact formula for the minimal norm of any nonzero complex number of the form a+bz? -->
OPTIONAL EXTRA:  Can you give an exact formula for the minimal norm of any nonzero complex number of the form a+bz?
 
'''December 12'''
 
-->

Latest revision as of 21:51, 21 April 2020

MATH 567

Elementary Number Theory

MWF 1:20-2:10, Van Vleck B119

Professor: Andrei Caldararu (andreic@math.wisc.edu)

Office Hours: Wednesdays 2:30-3:30, Van Vleck 605.

Grader: Yifan Peng, email: peng64@wisc.edu

Office Hours: TBA.

Math 567 is a course in elementary number theory, aimed at undergraduates majoring in math or other quantitative disciplines. A general familiarity with abstract algebra at the level of Math 541 will be assumed, but students who haven't taken 541 are welcome to attend if they're willing to play a little catchup. We will be using William Stein's new (and cheap) textbook Elementary Number Theory: Primes, Congruences, and Secrets, which emphasizes computational approaches to the subject. If you don't need a physical copy of the book, it is available as a free legal .pdf. We will be using the (free, public-domain) mathematical software SAGE, developed largely by Stein, as an integral component of our coursework. There is a useful online tutorial. You can download SAGE to your own computer or use it online.

Topics include some subset of, but are not limited to: Divisibility, the Euclidean algorithm and the GCD, linear Diophantine equations, prime numbers and uniqueness of factorization. Congruences, Chinese remainder theorem, Fermat's "little" theorem, Wilson's theorem, Euler's theorem and totient function, the RSA cryptosystem, Rabin's encryption scheme, Diffie-Hellman key exchange protocol. Number-theoretic functions, multiplicative functions, Möbius inversion. Primitive roots and indices. Quadratic reciprocity and the Legendre symbol. Perfect numbers, Mersenne primes, Fermat primes. Pythagorean triples, Special cases of Fermat's "last" theorem. Fibonacci numbers. Continued fractions. Distribution of primes, discussion of prime number theorem. Primality testing and factoring algorithms.

Course Policies: Homework will be due on Fridays. It can be turned in late only with advance permission from your grader. It is acceptable to use calculators and computers on homework (indeed, some of it will require a computer) but calculators are not allowed during exams. You are encouraged to work together on homework, but writeups must be done individually.

Many of the problems in this course will ask you to prove things. I expect proofs to be written in English sentences; the proofs in Stein's book are a good model for the level of verbosity I am looking for.

Grading: The grade in Math 567 will be composed of 50% homework, 25% midterm, 25% final. The midterm will be on March 11, in class. The final exam will be on 5/8/2020, 7:45AM-9:45AM in room TBA.

Syllabus: (This may change as we see what pace works well for the course. All section numbers refer to Stein's book.)

  • Jan 22-31: Prime numbers, prime factorizations, Euclidean algorithm and GCD (1.1-1.2)
  • Feb 3-7: The integers mod n, Euler's theorem, the phi function (2.1-2.2)
  • Feb 10-14: Modular exponentiation, primality testing, and primitive roots (2.4-2.5)
  • Feb 17-21: Public-key cryptography and RSA (3.1-3.4)
  • Feb 24-28: Rabin's algorithm (not in the book); algebraic numbers
  • Mar 2-6: Quadratic reciprocity (4.1-4.4)
  • Mar 9, Mar 13: Finite and infinite continued fractions (5.1-5.3)
  • Mar 11: Midterm exam
  • Mar 23-30: Continued fractions and diophantine approximation (5.4-5.5)
  • Apr 1-3: Diophantine equations I: Pell's equation and Lagrange's theorem
  • Apr 6-10: More diophantine equations, elliptic curves (6.1)
  • Apr 13-17: Applications of elliptic curves (6.2-6.3)
  • Apr 20-24: More applications of elliptic curves (6.4)
  • Apr 27-May 1: advanced topic TBD: maybe additional discussion of cryptographic techniques?

Video Lectures: Due to the university being transitioned to online teaching only, out lectures after spring break will need to be delivered online. I will post here videos for you to watch for the material we need to cover. Please watch them, and please give me feedback on how they could be improved.

  • Lecture for Mar. 23: watch it here.
  • Lecture for Mar. 25: watch it here.
  • Lecture for Mar. 27: watch it here.
  • Lecture for Mar. 30: watch it here.
  • Lecture for Apr. 1: watch it here.
  • Lecture for Apr. 3: watch it here.
  • Lecture for Apr. 6: watch it here.
  • Lecture for Apr. 8: watch it here.
  • Lecture for Apr. 10: watch it here.
  • Lecture for Apr. 13: watch it here.
  • Lecture for Apr. 15: watch it here.
  • Lecture for Apr. 17: watch it here.
  • Summary of the Apr. 20 lecture: watch it here.

Homework: Homework is due at the beginning of class on the specified Friday. Typing your homework is not a requirement, but if you don't already know LaTeX I highly recommend that you learn it and use it to typeset your homework. I will sometimes assign extra problems, which I will e-mail to the class list and include here.

  • Jan 31: 1.1, 1.3, 1.5, 1.7 (use SAGE), 1.8, 1.14.

Problem A: Use SAGE to compute the number of x in [1..N] such that x^2 + 1 is prime, for N = 100, N = 1000, and N = 10000. Let f(N) be the number of such x.

a) Can you formulate a conjecture about the relationship between f(N) and N/log N?

b) What if x^2 + 1 is replaced with x^2 + 2? Can you explain why x^2 + 2 appears less likely to be prime? (Hint: consider x mod 3.)

c) Prove that f(N) is at most (1/2)N+1. (Hint: consider x mod 2.)

d) Give as good an upper bound as you can for f(N).

Note that, despite the evident regularities you'll observe in this problem, we do not even know whether there are infinitely many primes of the form x^2 + 1! You would become very famous if you proved this.

  • Feb 7: 2.6 (the formulation of numerical evidence should be done by Sage if you've got Sage working, and by calculator if not; you can use an online tool like this to test whether a number is prime.) 2.8,2.9,2.11,2.12,2.14,2.19
  • Feb 17: 2.15, 2.18, 2.23, 2.26, 2.30.

Problem A: Prove that if n=pq, with p,q prime, then n is not a Carmichael number.

  • Feb 21: Book problems: 3.4, 3.5, 3.6

Problem A. Prove that there are infinitely many primes p such that 2 is not a primitive root in Z/pZ. We break this up into steps.

Problem A.1. Prove that, if x is an element of Z/nZ, then x^2 is not a primitive root.

Problem A.2. Prove that there are infinitely many primes p such that 2 is a square in Z/pZ. Hint: suppose there are only finitely many such primes p_1, .. p_r, and define N = (p_1 .. p_r)^2 - 2. Where can you go from here...?

Problem A.3. Give a list of five primes p such that 2 is not a primitive root in Z/pZ (you can use the method of this proof or any other.)

Problem B. Prove that 24 is the largest integer n such that every element of (Z/nZ)^* is a root of x^2-1.

  • Feb 28: Problem A. Using p = 23 and q=31, show how to encrypt the message x=240 with Rabin's algorithm. Find all possible decryptions of your encrypted message.
  • March 23: 4.1 from the book.

Problem A. Give a prime factorization of the Gaussian integer 7+9i.

Problem B. Read the notes from here. Note that Z[i] satisfies a reduction theorem: if n and d are Gaussian integers, then there exists integers q and r such that n = qd + r and Norm(r) < Norm(d). But (by contrast with the case of Z) this d may not be unique. In some contexts it is better to be able to choose r uniquely, even if this means letting r have norm greater than Norm(d).

B.1. When d = 1+2i, show that, for each n in Z[i], there is a unique pair (q,r) in Z[i] such that n = qd+r and r is contained in the set {0,1,2,3,4}. For instance, i can be written as i(1+2i) + 2, so we say i reduces to 2 mod (1+2i). (Hint: Suppose q(1+2i)+r = q'(1+2i) + r'. What can we say about (r-r'), and why is this incompatible with both r and r' being in {0,1,2,3,4}?

B.2. Show that if n is an integer in Z, the reduction of n mod (1+2i) is equal to its reduction mod 5.

Problem C. Let's try to figure out how to define "phi(d)" for a Gaussian integer d. Suppose S is a set of Gaussian integers such that every n in Z[i] can be written uniquely as qd+r, with q in Z[i] and r in S. (So for instance when d=1+2i, we showed in problem B that we can take S to be {0...4}. It would also be OK to take S to be {1..5} or {0,i,2i,1+i,1+2i}. In fact, it turns out that S has to be a set of size Norm(d) (I might or might not prove this in class; if not, feel free just to accept it.)

Now define phi(d) to be the number of elements s of S such that s and d are coprime.

C.1. Compute phi(1+2i) and phi(3).

C.2. Prove that the value of phi(d) does not depend on the choice of S.

C.3. Prove that every n in Z[i] which is coprime to 3 satisfies n^phi(3) = 1 mod 3; that is, Euler's theorem holds in this case. (You can prove this by direct computation; of course, if you want, you are welcome to prove that Euler's theorem holds for Z[i] in general, adapting the proof in Stein's book or the one we gave in class.)

  • March 30

Problem A. Express 50005 as the sum of two squares.

In the next two problems we denote by r(n) the number of ways to express n as the sum of two squares (i.e. the number of ordered pairs (a,b) such that a^2 + b^2 = n.) For instance, r(5) = 8: (a,b) = (+/-1, +/-2) or (+/-2, +/-1).

Problem B. Prove that, for any N, there exists an integer n such that r(n) > N. (I.E., the function r(n) is unbounded.)

Problem C. If you like Sage, write a short program in Sage to compute r(n) and compute the average of r(n) as n ranges from 1 to 1000. Whether or not you like Sage, make a guess as to how this average would behave if you replaced "1000" by a larger and larger number. (Feel free to ask the Sage-lovers what answer they got in the optional first part of the question.) Can you prove this guess is correct?

Problem D. We saw in class that the ring Z[sqrt(-5)] doesn't have unique factorization; 6 can be factored as 2*3 or (1+sqrt(-5))(1-sqrt(-5)). In this problem, we will prove that Z[sqrt(-d)] fails to have unique factorization for EVERY odd d >= 5. (Actually it's true for all d >= 5 but to make the proof manageable we'll restrict to the odd case.]

D.1. Show that (1+sqrt(-d)), (1-sqrt(-d)) and 2 are irreducible in Z[sqrt(-d)].

D.2. Now give an element of Z[sqrt(-d)] that has two distinct factorizations into irreducibles. (Hint: imitate the example we used for Z[sqrt(-5)].) Remark: The rings Z[sqrt(d)], where d is positive, are quite different -- here we believe that there are infinitely many with unique factorization, though this conjecture has remained unproved for many decades!

  • April 17

Book problems: 5.3,5.4,5.5

Problem A: We discussed in class the problem of studying which positive integers are the sum of two squares. In this problem we prove that every element n of (Z/pZ) is the sum of two squares. We argue as follows. Let S be the set of squares in (Z/pZ), and let T be the set of (Z/pZ) consisting of all elements of the form n - x^2, for some x in (Z/pZ).

A.1. What is the size of S and of T? Use this to show that S and T are not disjoint.

A.2. Given that S and T are not disjoint, prove that n is the sum of two squares.

Problem B. Using the continued fraction expansion, find a solution to the Pell equation x^2 - 13 y^2 = 1.

Problem C. Show that the modified Pell equation x^2 - 7y^2 = -1 has no solutions in integers x,y. (Hint: reduce the equation modulo a suitably chosen prime.)

Problem D. Stuffy Stirnweiss finished the 1945 season with a batting average of .3085443. Using continued fractions, guess how many at-bats he had. Tony Cuccinello had a batting average of .3084577. Given that he had more than 200 and fewer than 600 at-bats, can you estimate the number of at-bats he had?

  • April 24

Book problems 6.1, 6.2, 6.5, 6.10.

Problem A.1. Pick two values of a in F_11 = Z/11Z (a not equal to 3), such that the equation y^2 = x^3+ax+1 defines an elliptic curve (i.e., it is smooth). For each such a, determine the number of points #E(F_11) and check that it falls inside the interval described in class.

Problem A.2. The point P = (0,1) lies on each of these curves. For a =3 determine the order of P in the elliptic curve group, that is, find the smallest positive integer n such that nP = (infinity) -- the identity element in the group law.

Problem B. Show that if A+Bi is the cube of a Gaussian integer, then A^2 + B^2 is a perfect cube.