Quiz 2
Registry Synced

Number Theory

572 words
3 min read

Reading compass

Now · 🎯 Learning Objectives

Number Theory

🎯 Learning Objectives

  • Apply divisibility rules and the division algorithm
  • Use the Euclidean algorithm to find GCD
  • Compute with modular arithmetic
  • Prove properties of primes
  • Understand the Fundamental Theorem of Arithmetic

7.1 Divisibility

aba \mid b means b=akb = a \cdot k for some integer kk. Properties:
  • If aba \mid b and bcb \mid c, then aca \mid c (transitive)
  • If aba \mid b and aca \mid c, then a(b+c)a \mid (b + c) and a(bc)a \mid (b - c)
  • If aba \mid b, then abca \mid bc for any integer cc

Division Algorithm

For any integers a>0a > 0 and bb, there exist unique integers qq (quotient) and rr (remainder) with 0r<a0 \leq r < a such that b=qa+rb = qa + r.

7.2 GCD and Euclidean Algorithm

gcd(a,b)\gcd(a,b) is the largest integer dividing both aa and bb. Euclidean Algorithm:
  1. a=q1b+r1a = q_1 b + r_1 (0r1<b0 \leq r_1 < b)
  2. b=q2r1+r2b = q_2 r_1 + r_2 (0r2<r10 \leq r_2 < r_1)
  3. r1=q3r2+r3r_1 = q_3 r_2 + r_3
  4. Continue until remainder = 0. The last non-zero remainder is gcd(a,b)\gcd(a,b).

Example: gcd(1071,462)\gcd(1071, 462)

  • 1071=2×462+1471071 = 2 \times 462 + 147
  • 462=3×147+21462 = 3 \times 147 + 21
  • 147=7×21+0147 = 7 \times 21 + 0
  • gcd(1071,462)=21\gcd(1071, 462) = 21

7.3 Modular Arithmetic

ab(modn)a \equiv b \pmod{n} means n(ab)n \mid (a - b). Properties:
  • If ab(modn)a \equiv b \pmod{n} and cd(modn)c \equiv d \pmod{n}, then a+cb+d(modn)a + c \equiv b + d \pmod{n} and acbd(modn)ac \equiv bd \pmod{n}
  • ab(modn)    akbk(modn)a \equiv b \pmod{n} \implies a^k \equiv b^k \pmod{n}

Application: Divisibility Tests

A number is divisible by 9 iff the sum of its digits is divisible by 9 — because 101(mod9)10 \equiv 1 \pmod{9}.

7.4 Prime Numbers

A prime pp is an integer >1>1 with no positive divisors other than 1 and pp.

Fundamental Theorem of Arithmetic

Every integer n2n \geq 2 can be written uniquely as a product of primes (up to order).

Infinitely Many Primes (Euclid's Proof)

Assume finite list p1,,pkp_1, \dots, p_k. N=p1p2pk+1N = p_1p_2\cdots p_k + 1 is either prime (contradiction) or has a prime factor not in the list. Contradiction.

✅ Practice Questions

Q1: Find gcd(123,45)\gcd(123, 45) using Euclidean algorithm.
Solution
123=2×45+33123 = 2 \times 45 + 33 45=1×33+1245 = 1 \times 33 + 12 33=2×12+933 = 2 \times 12 + 9 12=1×9+312 = 1 \times 9 + 3 9=3×3+09 = 3 \times 3 + 0 gcd(123,45)=3\gcd(123, 45) = 3 Q2: Compute 7100(mod5)7^{100} \pmod{5}. Solution
72(mod5)7 \equiv 2 \pmod{5}, so 71002100(mod5)7^{100} \equiv 2^{100} \pmod{5}. 24=161(mod5)2^4 = 16 \equiv 1 \pmod{5}. 2100=(24)25125=1(mod5)2^{100} = (2^4)^{25} \equiv 1^{25} = 1 \pmod{5}. So 71001(mod5)7^{100} \equiv 1 \pmod{5}. Q3: Prove that if pp is prime and pabp \mid ab, then pap \mid a or pbp \mid b (Euclid's lemma). Solution
Assume pp prime, pabp \mid ab, and pap \nmid a. Then gcd(a,p)=1\gcd(a,p) = 1 (since pp is prime, its only divisors are 1 and pp). By Bézout's identity, there exist integers x,yx,y such that ax+py=1ax + py = 1. Multiply by bb: abx+pby=babx + pby = b. Since pabp \mid ab, pabxp \mid abx, and ppbyp \mid pby, so pbp \mid b. Join Discord PreviousRelations and FunctionsNextModular Arithmetic Deep
Document outline

Keep your place and jump directly to a heading.

Table of Contents
System Normal // Awaiting Context

Intelligence Hub

Navigate the knowledge graph to generate context. The Hub adapts dynamically to surface backlinks, related notes, and metadata insights.