Number Theory (Math 102 section 2)

"It matters little who first arrives at an idea, rather what is significant is how far that idea can go."

- Sophie Germain

Announcements

Homework 11 - Just for practice: NOT to be turned in.
Page 93: Problems 2, 5

Reminder: make sure to show all of your work.

Additional Problem 1: Find all solutions to $x^2\equiv 14$ (mod $31$) or explain why none exist.
Additional Problem 2: Determine if $x^2+57x-21 \equiv 0$ (mod $59$) has solutions or not.

Hint: Try "completing the square", but you will need to change the coefficient of $x$ first so that you can divide it by $2$.

Additional Problem 3: Consider the sequence \[3,6,11,18,27,38,\ldots,n^2+2,\ldots\] Are any of the terms of this infinite sequence divisible by 113? Explain. (If your answer is yes, you do NOT need to find which terms are divisible by 113.)
Additional Problem 4: Develop a theorem, similar to Theorems 5 and 6, for computing $\left(\frac{-2}{p}\right)$. Your theorem should have the form
"If $p$ is an odd prime, then $\left(\frac{-2}{p}\right) = 1$ if [something is true about $p$ mod 8] and $\left(\frac{-2}{p}\right) = -1$ if [something else is true about $p$ mod $8$]."
Make sure to prove your theorem! It's possible that your proof could be quite short.

Hint: Try using a property of the Legendre symbol together with Theorems 5 and 6.


Syllabus

[updated 01.10.20]

Meeting times: M,W,F 10:00AM - 10:50AM (Mendocino 2009)

Office Hours: M,T,W 12:00PM - 1:00PM. And also by appointment.

Student grades are maintained on Canvas.

Exam Outlines


Exam 1 Outline

[updated 02.22.20]

Exam 2 Outline

[updated 04.17.20]

Final Exam Outline

[updated 05.04.20]

Course Notes


Introduction

[updated 02.04.20]

Section 1

[updated 02.04.20]

Section 2

[updated 02.10.20]

Section 3

[updated 02.15.20]

Section 4

[updated 03.04.20]

Section 5

[updated 03.09.20]


Section 6

[updated 03.26.20]

Cryptography

[updated 03.28.20]

Section 7

[updated 04.06.20]

Section 9
(tentative)

[updated 03.28.20]

Section 10
(tentative)

[updated 04.15.20]

Section 11
(tentative)

[updated 04.24.20]

Homework Assignments

Homework 11 - Just for practice: NOT to be turned in.
Page 93: Problems 2, 5

Reminder: make sure to show all of your work.

Additional Problem 1: Find all solutions to $x^2\equiv 14$ (mod $31$) or explain why none exist.
Additional Problem 2: Determine if $x^2+57x-21 \equiv 0$ (mod $59$) has solutions or not.

Hint: Try "completing the square", but you will need to change the coefficient of $x$ first so that you can divide it by $2$.

Additional Problem 3: Consider the sequence \[3,6,11,18,27,38,\ldots,n^2+2,\ldots\] Are any of the terms of this infinite sequence divisible by 113? Explain. (If your answer is yes, you do NOT need to find which terms are divisible by 113.)
Additional Problem 4: Develop a theorem, similar to Theorems 5 and 6, for computing $\left(\frac{-2}{p}\right)$. Your theorem should have the form
"If $p$ is an odd prime, then $\left(\frac{-2}{p}\right) = 1$ if [something is true about $p$ mod 8] and $\left(\frac{-2}{p}\right) = -1$ if [something else is true about $p$ mod $8$]."
Make sure to prove your theorem! It's possible that your proof could be quite short.

Hint: Try using a property of the Legendre symbol together with Theorems 5 and 6.

Homework 10 - Due Friday May 01 (In Canvas, by end of the day)
Page 75: Exercise 2
Page 81-82: Problems 1, 5, 6, 9

  • Reminder: make sure to show all of your work.
  • Hint: on Problem 9, please change the hypothesis to $a\not\equiv 1$ (mod p), instead of $a\neq 1$ (mod p); otherwise, it isn't true. Then, start by showing that $a$ having order $t$ modulo $p$ implies that $a$ is a root of $x^t-1\equiv 0$ (mod $p$). Now factor the LHS...
Additional Problem 1: Let $p$ be an odd prime. Show that there exists exactly one least residue $a \in \mathbb{Z}$ such that $a$ has order $2$ modulo $p$.

Hint: if $a$ has order $2$, then $a$ is a solution to $x^2 \equiv 1$ (mod $p$). In Section 6, we determined the solutions to $x^2 \equiv 1$ (mod $p$); only one of them has order $2$, which one is it?

Just for Fun (Do Not Turn In): Let $p$ be a prime of the form $4k +1$. Show that there exists $a \in \mathbb{Z}$ such that $a$ has order $4$ modulo $p$.

Hint: By Theorem 6, there exists a primitive root $g$ of $p$. Let $t$ be the order of $g$. (What is $t$ equal to?) Now, if $k$ divides $t$ and $a = g^{t/k}$, what is $a^k$ equal to?

Submission. Submit a scan/photos of your completed assignment in Canvas: csus.instructure.com/courses/57912/assignments/653559
Homework 09 - Due Friday April 17 (In Canvas, by end of the day)
Page 71-72: Problems 2, 4, 6

Hint: on Problem 6, remember that Theorem 1 only applies when $\gcd(a,16) = 1$; in the other cases, you'll need to compute $a^8\;\text{(mod 16)}$ by hand (perhaps looking for patterns).

Additional Problem 1: Compute the least residue of each of the following. Use Theorem 1 when it applies. Show all of your work, but feel free to check your answers with WolframAlpha.
  1. $12^{102}$ (mod $125$)
  2. $25^{102}$ (mod $125$)
Additional Problem 2: Let $a,m\in \mathbb{Z}^+$ with $a$ and $m$ relatively prime. Prove that $$a^{\phi(m)} + m^{\phi(a)} \equiv 1 \quad\text{(mod $m$)}.$$
Additional Problem 3: Let $n\in \mathbb{Z}^+$. If $p$ is an odd prime number and $p$ divides $n$, show that $\phi(n)$ is even.

Hint: Theorem 3 is helpful.

Just for Fun (Do Not Turn In): Find all positive integers $n$ such that $\phi(n)$ is odd.
Submission. Submit a scan/photos of your completed assignment in Canvas: csus.instructure.com/courses/57912/assignments/653558
Homework 08 - Due Friday April 10 (In Canvas, by end of the day)
Page 55-56: Problems 2 (only the $d$ function), 4 (only the $d$ function), 7
Additional Problem 1:

You are communicating with a friend using ElGamal encryption with $p=107$ and $g = 8$ (see the notes). Your friend wants to send you a message, so you select the decryption key $a=66$. Your friend secretly selects an encryption key $b$. You then send your friend the number $g^a = 8^{66} \equiv 33$ (mod $107$), and in return, your friend sends you the number $g^b \equiv 68$ (mod $107$). Your are now ready to communicate.

Your friend sends you a nine-letter message by converting each letter to a number, encrypting the number, and then sending the encrypted numbers one at a time. You receive the nine encrypted numbers as $$c_1 = 47, c_2 = 27, c_3 = 7, c_4 = 103, c_5 = 38, c_6 = 56, c_7 = 29, c_8 = 45, c_9 = 18.$$

  1. Decrypt each of the nine numbers. You can use WolframAlpha for your computations. For example, if you need to find $29^{-1}$ (mod $107$), you would type in 29^(-1) mod 107 or alternatively inverse of 29 mod 107.

    Hint: Once you decrypt $c_1$, you should be able to reuse much of your work to make it easier to decrypt the remaining letters.

  2. Convert the decrypted numbers to letters using the rule $A=1, B=2, \ldots, Z = 26$ to figure out your friend's message.
Submission. Submit a scan/photos of your completed assignment in Canvas: csus.instructure.com/courses/57912/assignments/653557
Homework 07 - Due Friday March 27 Sunday March 29 (In Canvas, by end of the day)
Page 48-49: Problems 11, 15(a)

Hint: there is a hint in the "Comments" section of the book for Problem 11. Try using Fermat's Theorem for Problem 15(a).

Recall our definition of $a^{-1}$ from class. You will need this for the additional problems.

Definition: Let $p$ be prime. If $a\not\equiv 0$ (mod $p$), then the unique solution to $ax\equiv 1$ (mod $p$) is denoted $a^{-1}$. Thus, $$aa^{-1} \equiv 1\quad \text{(mod $p$)}.$$

Additional Problem 1: Complete the following table of inverses modulo $7$
a0123456
$a^{-1}$ DNE 3
Additional Problem 2: This problem has two parts. First use the Euclidean Algorithm to find an integer solution to $20u + 71v = 1$. Second, use your solution to the first part to find $20^{-1}$ modulo 71.

When you are done, you can check your work using WolframAlpha: it understands commands like "inverse of 20 mod 71".

Submission. Submit a scan/photos of your completed assignment in Canvas: csus.instructure.com/courses/57912/assignments/653556
Homework 06 - Due Friday March 20 (1:00PM in Canvas) Monday March 16 (In Class)
Page 40-41: Problems 3(b), 13
Page 48-49: Problems 2, 3, 6, 8 (Make sure to show your work!)
Additional Problem 1: This problem has two parts. First use the Euclidean Algorithm to find an integer solution to $15u + 101v = 1$. Second, use your solution to the first part to solve the congruence $15x \equiv 2\;\; (\text{mod $101$}).$

For the first part, you can look back at the notes from Section 1. For the second part, see the last example in the notes from Section 5. When you are done, you can check your work using WolframAlpha: it understands commands like "solve 15x = 2 mod 101".

Additional Problem 2: Let $p$ be a prime. Show that for all $a,b\in \mathbb{Z}$, $(a+b)^p \equiv a^p + b^p$ (mod $p$).

Make sure to clearly state which theorem(s) you use.

Submission. Submit a scan/photos of your completed assignment in Canvas: csus.instructure.com/courses/57912/assignments/653555
Homework 05 - Due Monday March 9 Friday March 6 (In Class)
Page 32-33: Problems 4, 13

Hint: on Problem 4, you should disprove the statement by giving a concrete example of $a$, $b$, and $m$ for which it fails. (There are many such examples, so everyone should try to find their own.)

Hint: on Problem 13, you should look in your notes to see how we addressed Problem 12. The key idea is that if $d_0$ is the ones digit of $n$, then $n\equiv d_0$ (mod $10$). Now, if $n$ is a fourth power, then $n=m^4$, so starting with the possibilities for $m$ modulo $10$, you should work out the possibilities for $n$ modulo $10$. Don't forget to explain your answer!

Page 35: Exercise 1
Page 38: Exercises 5
Page 40-41: Problems 2, 9(a)
Additional Problem 1: Find all solutions to each of the following. If no solutions exist, explain why not. Please show your work.
  1. $x^3 +1 \equiv 0$ (mod $7$)
  2. $x^2 + 2 \equiv 0$ (mod $7$)
Additional Problem 2: Let $n\in \mathbb{Z}$ be a five digit number. Let $d_4d_3d_2d_1d_0$ be the digits of $n$, so $$n = d_410^4 + d_310^3 + 10^2d_2 + 10d_1 + d_0.$$ Prove that $n$ is divisible by $11$ precisely when $d_4 - d_3 + d_2 - d_1 + d_0$ is divisible by $11$ (i.e. when the "alternating sum of the digits" is divisible by $11$.)
Just for Fun (Do Not Turn In): Let $n\in \mathbb{Z}$. Let $d_kd_{k-1}\cdots d_2d_1d_0$ be the digits of $n$, so $$n = d_k10^k + d_{k-1}10^{k-1}+ \cdots + 10^2d_2 + 10d_1 + d_0.$$ We have seen that
  • $n$ is divisible by $3$ precisely when the sum of the digits is divisible by $3$.
  • $n$ is divisible by $11$ precisely when the alternating sum of the digits is divisible by $11$.
Here's another one.
  • $n$ is divisible by $13$ precisely when $(d_0 -3d_1 -4d_2 -d_3) + (d_4 -3d_5 -4d_6 -d_7) + \cdots$ is divisible by $13$
Develop and prove a similar rule for divisibility by $7$.
Homework 04 - Due Monday February 24 (In Class)
Page 25: Exercises 4
Page 26: Problems 2, 5, 6

Clarification: on Problem 2, you are are asked to solve each of the three equations separately. It is not a system of equations.

Hint: Problem 5 is a system of equations. Try "combining" the equations to get a new equation in two variables, which you can use the methods of the book to solve. Then plug your solutions into the original equations to solve for the remaining variable. The answer is in the back of the book, but please show your work! Problem 6 is very similar to this one.

Page 32: Problems 2, 6
Additional Problem 1: Find the least residue of each of the following. Please show your work.
  1. $7^3$ (mod $5$)
  2. $2^{100}$ (mod $5$) Hint: $2^2 \equiv -1$ (mod $5$)
  3. $2^{113} + 18$ (mod $5$)
Homework 03 - Due Monday February 17 (In Class)
Page 19: Problems 1,5,6,9 (Make sure to justify everything, including #9.)

Hint: On #5, please assume that $n\ge 2$. Now, you know that $n=m^2$ for some integer $m$. Assume you know the prime-power decomposition for $m$, and see what you can then infer about $n$. On #6, you are assuming that the prime power decomposition for $n$ is $n=p_1^{2a_1}p_2^{2a_2}\cdots p_k^{2a_k}$ (notice how the exponents are even). Now, you want to show $n=m^2$ for some integer $m$. Try to explicitly write down what $m$ is and then verify that $m^2 = n$.

Page 22: Exercise 2
Page 23: Exercise 3 (Make sure to explain.)
Additional Problem 1: Suppose that $n$ is a positive even integer that is divisible by 7 and is also a cube. What is the smallest that $n$ could be? (Make sure to explain.)
Additional Problem 2: Find infinitely-many integer solutions to each of the following diophantine equations. If no solutions exist, explain why not.
  1. $4x-10y = 50$
  2. $4x-10y = 51$
Homework 02 - Due Friday February 7 (In Class)
Page 9: Problems 1, 4, 14 (remember that $a$, $b$, and $c$ denote arbitrary integers)

Hint: on 14, consider using Theorem 4—the proof of Corollary 1 may provide extra inspiration.

Page 12: Exercise 3
Page 19: Problems 8 (justify your answer)
Additional Problem 1: Find all primes that divide $30!$.
Additional Problem 2: Suppose that $n$ is any four-digit integer and that $\operatorname{gcd}(n,100!) = 1$. Prove that $n$ must be prime.

Hint: What if $n$ is not prime? Then Lemma 4 of Section 2 tells you something about the prime divisors of $n$. But, $\operatorname{gcd}(n,100!) = 1$ also tells you something about the prime divisors of $n$.

Additional Problem 3: Suppose that $p$ is prime and that $p = n^3 - 1$ for some $n\in \mathbb{Z}_{>0}$. Prove that $p=7$.

Hint: can you factor $p$? But, $p$ is prime, so what are its possible factors? What does this imply about $n$?

Homework 01 - Due Friday January 31 (At start of class)
Page 2: Exercise 2 (remember that $a$, $b$, and $c$ denote arbitrary integers)

Hint: try to start like this: "Assume that $a\mid b$ and $b\mid c$. Since $a\mid b$, there is some integer $d$ such that $b = ad$. Also since $b\mid c$, there is some integer $e$ such that…" (keep going to show that $a$ divides $c$)

Page 4: Exercises 4, 6

Please make sure to briefly explain/justify your answers.

Page 9: Problems 12, 15(a)

Hint: On #15, try to start like this: "Assume that $x^2 + ax + b = 0$ has an integer root. So there is some integer $r$ such that $r^2 + ar + b = 0$.…" (keep going to show that $r$ divides $b$)