Modulus: 2
Fermat's little theorem:
xp-1 ≡ 1 (mod p)
Modulus is a prime: p = 2
x1 ≡ 1 (mod 2)
Modulus is a prime: p = 2
x1 ≡ 1 (mod 2)
Congruence:
Given two integer values a and b
if a ≡ b (mod 2) then a and b are congruent
a - b ≡ 0 (mod 2)
if a ≡ b (mod 2) then a and b are congruent
a - b ≡ 0 (mod 2)
Modulus: 2
Calculator: Modulus = 2
Modulus: 2
Euler's Totient Function φ(n)
Euler's totient function calculates the number of positive integers less than n that are coprime with n.
If x and n are coprime, xφ(n) ≡ 1 (mod n)
If x and n are coprime, xφ(n) ≡ 1 (mod n)
Calculating φ(n)
φ(p) = p - 1 if p is prime
If n is not prime, express n as a product of prime factors
n = p1k1p2k2... pnkn
φ(n) = (p1-1)p1k1-1 (p1-1)p2k2-1... (pn-1)pnk1-1
If n is not prime, express n as a product of prime factors
n = p1k1p2k2... pnkn
φ(n) = (p1-1)p1k1-1 (p1-1)p2k2-1... (pn-1)pnk1-1