Number Theory (Math 102 section 1)

"Die Mathematik ist die Königin der Wissenschaften und die Zahlentheorie ist die Königin der Mathematik."

- Carl Friedrich Gauss

Homework 11 - Due Wednesday May 09 (In Class)
Page 93: Problems 2, 5

Reminder: make sure to show all of your work.

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

Hint: Complete the square. Change the coefficient of $x$ so you can divide it by $2$.

Extra 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.)
Extra 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!

Hint: Try using a property of the Legendre symbol together with Theorems 5 and 6. It's possible that your proof could be quite short.

The Final Exam is on Monday May 14 from 12:45–2:45
An outline of the material for the Final Exam is in the Handouts section below. Let me know if you have any questions. Happy mathing!

  Meeting times: MW 1:30PM - 2:45PM (Sequoia 142)
  Office Hours: MW 12:00PM - 1:00PM; F 11:00AM - 12:00PM (Brighton 144). Also by appointment—just email me.

The general course information can be found in the syllabus below. Student grades are maintained on Canvas.

Handouts


Final Exam Outline

[updated 05.07.18]

Exam 2 Outline

[updated 04.13.18]

Exam 1 Outline

[updated 02.22.18]

Syllabus

[updated 01.20.18]

Course Notes


Section 4

[updated 02.23.18]

Section 5

[updated 03.06.18]

Section 6

[updated 03.21.18]

Cryptography

[updated 03.21.18]

Section 7

[updated 04.04.18]

Section 9

[updated 04.04.18]


Section 10

[updated 04.20.18]

Section 11

[updated 05.01.18]

Homework Assignments

Homework 11 - Due Wednesday May 09 (In Class)
Page 93: Problems 2, 5

Reminder: make sure to show all of your work.

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

Hint: Complete the square. Change the coefficient of $x$ so you can divide it by $2$.

Extra 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.)
Extra 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 Wednesday April 25 (In Class)
Page 75: Exercise 2
Page 81-82: Problems 1, 5, 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...
Extra Problem 1: Let $p$ be an odd prime. Show that there exists $x \in \mathbb{Z}$ such that $x$ has order $2$ modulo $p$.

Hint: if $x$ has order $2$, then $x$ is a solution to $x^2 \equiv 1$ (mod $p$). What are the solutions? Only one of them has order $2$, which one is it?

Extra Problem 2: Let $p$ be an odd prime. Show that if there exists $x \in \mathbb{Z}$ such that $x$ has order $4$ modulo $p$, then $4$ divides $p-1$.

Hint: Theorem 2.

Extra Problem 3: Let $p$ be an odd prime. Show that if $4$ divides $p-1$, then there exists $x \in \mathbb{Z}$ such that $x$ 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 the value of t? If $m$ divides $t$ and $a = g^{t/m}$, what is $a^m$?

Homework 09 - Due Wednesday April 11 (In Class)
Page 71-72: Problems 2, 4, 6, 7

Hint: on Problem 7, the theorems from the section are quite helpful, but make sure to cite which ones you use.

Extra Problem 1: Compute the least residue of each of the following. Show all of your work, but feel free to check your answers with WolframAlpha.
  1. $12^{102}$ (mod $125$)
  2. $25^{102}$ (mod $125$)
Extra 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$)}.$$
Extra 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.
Homework 08 - Due Wednesday April 04 (In Class)
Page 55-56: Problems 2, 4
Extra Problem 1: Two positive integers $a$ and $b$ are called amicable if $\sigma(a) = a+b = \sigma(b)$. Show that 1184 and 1210 are amicable.
Extra Problem 2:

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.
  2. Convert the decrypted numbers to letters using the rule $A=1, B=2, \ldots, Z = 26$ to figure out your friend's message.
Homework 07 - Due Wednesday March 28 (In Class)
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 inverse from class.

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$)}.$$

Extra Problem 1: Complete the following table of inverses modulo $7$
a0123456
$a^{-1}$ DNE 3
Extra Problem 2: Let $p$ be prime. Let $a,x\in \mathbb{Z}$ with $a\not\equiv 0$ (mod $p$). Carefully show: if $ax\equiv 2$ (mod $p$), then $x\equiv 2a^{-1}$ (mod $p$).
Homework 06 - Due Wednesday March 14 (In Class)
Page 40-41: Problems 3(b,c), 13
Page 48-49: Problems 2, 3, 6, 8 (Make sure to show your work!)
Extra Problem 1: 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.

Homework 05 - Due Wednesday March 7 (In Class)
Page 32-33: Problems 4, 12, 13 (Sorry, I assigned the wrong problem—we did 12 in class.)

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, 3(b,c), 9(a), 13 Let's save 3 and 13 until next time.
Extra Problem 1: Find all solutions to each of the following. If no solutions exist, explain why not. Please show your work.
  1. $x^3 \equiv -1$ (mod $7$)
  2. $x^2 - 2 \equiv 0$ (mod $7$)
Extra 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 Wednesday February 21 (In Class)
Page 25: Exercises 4,5
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
Extra 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$)
Extra Problem 2: Find all solutions to each of the following. If no solutions exist, explain why not. Please show your work. Don't do this one. We'll save it for a future assignment.
  1. $3x\equiv 2$ (mod $5$)
  2. $3x\equiv 0$ (mod $9$)
  3. $x^3 \equiv -1$ (mod $7$)
  4. $x^2 - 2 \equiv 0$ (mod $7$)
Homework 03 - Due Wednesday February ♥ (In Class)
Page 19: Problems 5,6

Hint: we did something very similar to these in class.

Page 22: Exercise 2
Page 23: Exercise 3 (Make sure to explain.)
Extra 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.)
Extra Problem 2: Let $n$ and $k$ be positive integers with $k\ge 2$. Also assume that $n^k - 1$ is prime. Prove that $n=2$.

Hint: look at our warm-up problems—try to factor $n^k - 1$.

Extra Problem 3: 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 Wednesday 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 (prove your answer)
Extra Problem 1: Find all primes that divide $50!$.
Extra Problem 2: Suppose that $n$ is any four-digit integer and that $(n,100!) = 1$. Prove that $n$ must be prime.
Extra Problem 3: Let $n\in \mathbb{Z}^+$. Prove that the only prime of the form $n^3 - 1$ is $7$.
Homework 01 - Due Wednesday January 31 (In Class)
Page 2: Exercise 2 (remember that $a$, $b$, and $c$ denote arbitrary integers)
Page 3: Exercise 3 - prove this from the definition; please do NOT use Lemma 2 oops...we proved this in class!
Page 4: Exercises 4, 6
Page 9: Problems 13, 15(a)

Warm-up Problems

Wednesday February 21

Find all solutions (if any) to each of the following:

  1. $x^2 = -1$ in $\mathbb{Z}$
  2. $x^2 \equiv -1$ (mod 5)
  3. $x^2 \equiv -1$ (mod 7)
Were any of the answers unexpected? Repeat for the following.
  1. $x^2 = 0$ in $\mathbb{Z}$
  2. $x^2 \equiv 0$ (mod 5)
  3. $x^2 \equiv 0$ (mod 8)

Monday February 19

Draw a number line from -20 to 20.

  • Label red all numbers $a$ such that $a\equiv 0$ mod 4.
  • Label blue all numbers $a$ such that $a\equiv 1$ mod 4.
  • Label green all numbers $a$ such that $a\equiv 2$ mod 4.
Are all numbers colored?

Wednesday February ♥

None ☹

Monday February 12

It's my first day selling burgers and burritos on the beach. At the end of my shift, I sold $\$107$ worth of food. I just remembered that my boss wanted me to keep track of how many of each item I sold. I know that I definitely sold more burritos than burgers, and I bought two burgers myself. Can you help me? Oh, and burgers are $\$5$ a piece while burritos are $\$6$ a piece.

Wednesday February 7

Suppose you know that $n$ is a square integer and that the only prime divisors of $n$ are 2 and 7. What is the smallest that $n$ can be?

Monday February 5

Let $n$ be a postive integer.

  1. For what values of $n$ (if any) is $n^2-1$ a prime number?
  2. For what values of $n$ (if any) is $n^3-1$ a prime number?
  3. For what values of $n$ (if any) is $n^4-1$ a prime number?
  4. Can you make (and possibly prove) and conjectures based off of these observations?

Wednesday January 31

Define a square filling of of a rectangle to be a subdivision of the rectangle into squares of the same size.

  1. Find a square filling of a $2 \times 3$ rectangle. Repeat for a $4 \times 4$ rectangle—can you find different square fillings?
  2. What is the fewest possible number of squares in a square filling of a $12 \times 20$ rectangle?
  3. What is the fewest possible number of squares in a square filling of a $m \times n$ rectangle with $m,n\in \mathbb{Z}^+$?

Monday January 29

  1. Find $(21,22)$, $(35,36)$, and $(48,49)$.
  2. Conjecture + Prove: if $n\in \mathbb{Z}^+$, then $(n,n+1) = $ ?
  3. Conjecture + Prove: if $n\in \mathbb{Z}^+$, then $(n,n+2) = $ ?