Number Theory Flashcards
Composite
An integer >= 2 that is not prime
Highest common factor
The largest integer which is a factor of both a and b is the hcf(a,b)
Coprime
Two integers a,b are congruent modulo n Id a-b is a multiple of n
Invertible
- An element a in Z/n is invertible modulo n if there exists b in Z/n s.t. ab=1modn.
- The set of invertible elements in Z/n is written(Z/n)^x.
- This is a group with operation of multiplication.
Euler-Totient Function
The number of invertible elements in Z/n, ie. The order of the group (Z/n)^x
The number of positive integers less than n, coprime to n
Primitive Root (modp)
An element a ∈ F^xp is a primitive root modulo p if a generates the multiplicative group F^xp ie. Every element of F^xp is a power of a
Prime Number
An integer p>=2 is a prime if the only factors of p are ±1 and ±p
Chinese Remainder Theorem
Let n,m be coprime.
Given a ∈ Z/n and b ∈Z/m
There is a unique x ∈ Z/mm s.t. X = a modn and X = b modm
CRT proof
Existence: since n and m are coprime, by Euclid’s algorithm there is a h,k s.t. 1=hn + LM
Let x=hnb + kma
We can check X=a(n) X=b(m)
a = hnb + kma (n)
=(1-hn)a = 1 x a = a(n)
Similarly b(m)
Fermat’s Little Theorem
A ∈Fp^x and this is a group with p-1 elements
Let n be the order of a in this group IR. The smallest natural number s.t. a^n = 1 modp
Proof:
By Lagrange’s theorem: n divides the order of a which is p-1, so n is a factor of p-1
Therefore p-1 =nm for some m∈Z
Then a^p-1 = a^nm =(a^n)^m = 1^m = 1 modp
Berzout’s Lemma
Given a, b ∈Z, and a, b not zero, Ε h,k ∈ Z s.t ha + kb = hcf (a, b)
- use Euclid’s algorithm to find h and k
- to find a^-1 : find ha + kn = 1 by euclids then h is a^-1 mod n
There are infinitely many prime numbers
Assume that there are only finitely many primes; p1,p2,…..,pn
Let N = p1•p2…•pn +1
Since N >= 2 there is at least one prime which divides N
So pi | N ie. N = 0 (pi)
But clearly N = 1 modpi
Therefore contradiction!
And N doesn’t have a prime factor and must be a prime
Unique factorisation of integers
For any positive integer n, there is a factorisation n=p1….pr
This factorisation is unique up to reordering the primes pi….pr
Euler’s Theorem
If a is invertible mod(n), ie. a ∈(Z/n)^x then a^@(n) =1 mod(n)
Proof:
Let a ∈(Z/n)^x and let d be the order of a in this group, ie. Smallest d > 0 st. a^d = 1 (n)
By Lagrange’s theorem, d|@(n) ie. @(n) = d x e
a^d = 1 (n) therefore a^@(n) = a^(de) = (a^d)^e = 1^e = 1 (n)
Eratostene’s Sieve
Test for n primes
Testing for primitive roots
Let p be a prime a ∈Fˣp
To test if α is a quadratic residue mod p:
1. Find the primes q | p-1
2. For each q, calculate a^(p-1)/q mod p
If none of these are 1 modp ⇒ a is a primitive root