### Modulus: 2

##### Fermat's little theorem:

x

Modulus is a prime: p = 2

x

^{p-1}≡ 1 (mod p)Modulus is a prime: p = 2

x

^{1}≡ 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

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 = p

φ(n) = (p

If n is not prime, express n as a product of prime factors

n = p

_{1}^{k1}p_{2}^{k2}... p_{n}^{kn}φ(n) = (p

_{1}-1)p_{1}^{k1-1}(p_{1}-1)p_{2}^{k2-1}... (p_{n}-1)p_{n}^{k1-1}