4. Euler's Totient
Euler's Totient of a number is a function that provides a count of the natural numbers less than the number that would form a co-prime pair with it.
ϕ(n) is the function that represents the Euler's totient for the number n.
If the prime factors of n are x1,x2,x3,...
ϕ(n) = n×(1−x11)×(1−x21)×(1−x31)×...
Example 23
How many natural numbers less than 24 are co-prime with 24?
Solution
24×23×3
∴ The prime factors of 24 are 2 and 3.
ϕ(24)= 24×(1−21)×(1−31)
=24×21×32=8
Number of co-primes =8
Answer: 8
Note: The co-primes of 24 that are less than it are 1, 5, 7, 11, 13, 17, 19 and 23.
4.1 Fermat's Little Theorem of Remainders
For any given number
n and divisor d, if
(1) n and d are co-prime, and
(2) ϕ(d) is the Euler's totient of d
Rem(dnϕ(d))=1
Example 24
What is the remainder when 791983 is divided by 12?
Solution
We first reduce the base of 79, applying the exponent rule.
Rem(12791983)=Rem(12(72+7)1983)=Rem(1271983)
7 and 12 are co-prime. ∴ We can now reduce the power by applying Fermat's little theorem.
ϕ(12) = 12×(1−21)×(1−31)=4
Fermat's little theorem states Rem(1274)=1
Rem(1271983)= Rem(12(74)495×73)= Rem(121495×343)=7
Alternatively
When the base and the divisor are co-prime, you can directly apply the following to improve your speed:
1) Exponent Rule: In the base, write the remainder when base is divided by the divisor
2) Fermat's Theorem: In the power, write the remainder when the power is divided by the ϕ(divisor).
Rem(1279)=7 ; Rem(41983)=3
∴ Rem(12(79)1983)=Rem(1273)=7
Answer: 7
Example 25
What is the remainder when 4347 is divided by 23?
Solution
43 and 23 are co-prime. ϕ(23)= 23×(1−231)=22
Applying Fermat's little theorem,
we get Rem(23(43)22)=1
Rem(23(43)47)=Rem(23((43)47)2×(43)3)=Rem(23(43)3)
= Rem(23(43−3)3)=Rem(23(−3)3)=Rem(23−27)
The remainder is unchanged when a multiple of the divisor is added to the dividend.
∴ Rem(23(−27+46))=19
Answer: 19
5. Chinese Remainder
If the numerator and denominator are not co-prime, then Fermat's Little Theorem cannot be directly applied.
The following steps are then followed,
1) The divisor is prime factorised
2) The remainders when the number is divided by each of the prime factors (with their respective powers) is found.
3) The number is expressed in dq+r for the different divisors to find the common remainder.
Example 26
What is the remainder when 250340 is divided by 44?
Solution
44=22×11
22 perfectly divides 250340 ⇒ Rem(22(250)340)=0
∴ Where a is an integer, 250340=4a+0 ⟶(1)
Rem(11(250)340)=Rem(11(242+8)340)=Rem(11(8)340)
ϕ(11)=11×(1−111)=10
∴ Rem(118340)=Rem(11(810)34)=1
∴ Where b is an integer, 250340=11b+1 ⟶(2)
Equating (1) and (2),
4a+0=11b+1
⇒ a=411b+1
b = 1 satisfies. Substituting in (2),
Remainder = 11×1+1=12
Answer: 12