Daniel Liu
June 2021
Introduction:
Euler’s totient is a function that, when given an integer n, computes the number of integers less than n that are relatively prime to n. The function is denoted by the symbol . Thus,
is simply 2, since the numbers less than 3 that are relatively prime to 3 are 1 and 2. Similarly,
is 4, as we see there are four integers less than 8 relatively prime to 8: 1, 3, 5, and 7. As you will see later, this function is extremely useful in number theory, especially when computing the last a digits of a given expression, such as
. Note that Euler’s totient is synonymous with the phi function and both names will be used interchangeably throughout this guide.
Computing Values:
Calculating values for Euler’s totient turns out to be a fairly easy task- though it may become computationally burdensome for larger integers. The general formula for the function is, given a prime integer a,
Remark: From this, one can derive that of a prime p is always p-1.
However, this formula seems to be of little use at first glance, as it is only applicable to powers of primes, such as . This renders it useless for numbers such as 35 (
) whose factorizations involve more than one prime.
Luckily, there is one identity that connects the formula to all integers:
which holds for all relatively prime integers a and b.
Example 1.1: Compute .
Since 27’s prime factorization is , we simply plug this value into the formula to get
which equals 18.
Example 1.2: Compute .
Through a bit of long division and guess-and-check, we come to the conclusion that . We repeat the above process to compute that
is equal to 2. Because 3, 7, and 23 are all prime, we can use the identity that ϕ of a prime number is equivalent to the prime number minus one:
,
,
. To finish out the problem, we multiply together the values of each computation to get 528.
Exercise 1.1: Compute .
Exercise 1.2: Compute .
☆ Exercise 1.3: Prove the identity .
Euler’s Theorem
Admittedly, the phi function alone has little use in the real world. However, its applications allow its influence on the field of number theory to range far. Perhaps the most prominent use is in Euler’s Theorem. The theorem states that, for coprime integers a and n,
Example 2.1: Find the last two digits of .
To find the last two digits of the number, we take its value modulo 100. At first, this task seems quite daunting. How would we find that? But note that 37 and 100 are relatively prime. This means that by Euler’s theorem.
We observe that , which mean
is 40. Thus,
. Further,
. This means that
.
We now claim that . From here,
. Therefore, the last two digits of
are 69.
Example 2.2: Find the last two digits of .
The obvious solution would be to attempt to emulate our process in the previous problem. However, we quickly realize that we are unable to do that, since 44 and 2006 are not coprime.
We shall now use properties of exponents and mod to our advantage. . Moreover, if
, then
by the property
.
From here, we compute . If we can do this, we know
, based on the claim above. Since 4 and 25 are relatively prime,
. Because
is equivalent to
,
. We can easily compute
by hand to get that
.
We now compute . For the sake of brevity, its calculation will not be fully explained, since it is a direct application of Euler’s theorem and exactly mirrors example 2.1, but with different numbers.
.
The answer is simply , which equals
. Since -300 is the closest multiple of 100 to -244 that is still less than -244, we perform
to arrive at our answer, 56.
Exercise 2.2: Find the last three digits of .
☆ Exercise 2.3: Let N be a positive integer, and A(N) be the sum of the digits of N. Define S(N) to be the single digit obtained by repeatedly applying the function A(N) on N (as many times as needed). Find , where there are 2021 7’s in the tower. Hint: A(N) is equivalent to N (mod 9).
☆ Exercise 2.4: Prove that . Hint: Consider an arbitrary set A whose elements are all taken modulo m, where each element is relatively prime to m. Prove that A is identical to set B mod m, where the elements of B are found by multiplying the elements of A by a constant a.
