Euler's totient function
Encyclopedia : E : EU : EUL : Euler's totient function
- For other meanings, see Euler function (disambiguation).
In number theory, the totient [\phi](n) of a positive integer n is defined to be the number of positive integers less than or equal to n and coprime to n. For example, [\phi](8) = 4 since the four numbers 1, 3, 5 and 7 are coprime to 8. The function [\phi] so defined is the totient function. The totient is usually called the Euler totient or Euler's totient, after the Swiss mathematician Leonhard Euler, who studied it. The totient function is also called Euler's phi function or simply the phi function, since the letter Phi ([\phi]) is so commonly used for it. The cototient of n is defined as n − [\phi](n).
The totient function is important mainly because it gives the size of the multiplicative group of integers modulo n. More precisely, [\phi](n) is the order of the group of units of the ring [\mathbb/n\mathbb]. This fact, together with Lagrange's theorem, provides a proof for Euler's theorem.
Computing Euler's function
It follows from the definition that [\phi](1) = 1, and [\phi](n) is (p − 1)pk−1 when n is the kth power of a prime number p. Moreover, [\phi] is a multiplicative function; if m and n are coprime then [\phi](mn) = [\phi](m)[\phi](n). (Sketch of proof: let A, B, C be the sets of residue classes modulo-and-coprime-to m, n, mn respectively; then there is a bijection between AxB and C, via the Chinese remainder theorem.) The value of [\phi](n) can thus be computed using the fundamental theorem of arithmetic: if
- n = p1k1 ... prkr
- [\varphi(n)=(p_-1)p_^-1} \cdots (p_-1)p_^-1}]
- [\varphi(n)=n\prod_\left(1-\frac\right)]
Computing example
- [\varphi(36)=\varphi(3^22^2)=36\left(1-\frac\right)\left(1-\frac\right)=36\cdot\frac\cdot\frac=12]
Some values of the function
| [\varphi(n)] | +0 | +1 | +2 | +3 | +4 | +5 | +6 | +7 | +8 | +9 | +10 | +11 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0+ | 1 | 1 | 2 | 2 | 4 | 2 | 6 | 4 | 6 | 4 | 10 | |
| 12+ | 4 | 12 | 6 | 8 | 8 | 16 | 6 | 18 | 8 | 12 | 10 | 22 |
| 24+ | 8 | 20 | 12 | 18 | 12 | 28 | 8 | 30 | 16 | 20 | 16 | 24 |
| 36+ | 12 | 36 | 18 | 24 | 16 | 40 | 12 | 42 | 20 | 24 | 22 | 46 |
| 48+ | 16 | 42 | 20 | 32 | 24 | 52 | 18 | 40 | 24 | 36 | 28 | 58 |
| 60+ | 16 | 60 | 30 | 36 | 32 | 48 | 20 | 66 | 32 | 44 | 24 | 70 |
| 72+ | 24 | 72 | 36 | 40 | 36 | 60 | 24 | 78 | 32 | 54 | 40 | 82 |
Properties
The number [\phi](n) is also equal to the number of possible generators of the cyclic group Cn (and therefore also to the degree of the cyclotomic polynomial [\phi]n). Since every element of Cn generates a cyclic subgroup and the subgroups of Cn are of the form Cd where d divides n (written as d|n), we get- [\sum_\varphi(d)=n]
We can now use the Möbius inversion formula to "invert" this sum and get another formula for [\phi](n):
- [\varphi(n)=\sum_ d \mu(n/d) ]
According to Euler's theorem, if a is coprime to n, that is, gcd(a,n) = 1, then
- [ a^ \equiv 1\mod n.]
The two generating functions presented here are both consequences of the fact that
- [\sum_ \varphi(d) = n.]
A Dirichlet series involving [\phi](n) is
- [\sum_^\infty \frac=\frac.]
This is derived as follows:
- [ \zeta(s) \sum_^\infty \frac =\sum_^\infty \left(\sum_ \varphi(d)\right) \frac =\sum_^\infty \frac = \zeta(s-1),]
A Lambert series generating function is
- [\sum_^ \frac= \frac]
This follows from
- [\sum_^ \frac =\sum_^ \varphi(n) \sum_ q^]
- [\sum_ q^k \sum_ \varphi(n) =\sum_ k q^k = \frac.]
Growth of the function
The growth of [\phi](n) as a function of n is an interesting question, since the first impression from small n that [\phi](n) might be noticeably smaller than n is somewhat misleading. Asymptotically we have
- [\,n^<\phi(n)
- [\,\phi(n)/n]
- [1-p^\,]
- [C\,\quad \log \log n/ \log n]
- [\frac \sum_^n \varphi(k)= \frac + \mathcal\left(\frac\right)]
Other formulas involving Euler's function
- [\;\varphi(n^m) = n^\varphi(n)] for [m\ge 1]
- [\sum_ \frac = \frac]
- [\sum_ = \fracn\varphi(n)] for [\;n>1]
- [\sum_^n\varphi(k) = \frac\left(1+ \sum_^n \mu(k)\left\lfloor\frac\right\rfloor^2\right)]
- [\sum_^n\frac = \sum_^n\frac\left\lfloor\frac\right\rfloor]
- [\sum_^n\frac = \mathcal(n)]
- [\sum_^n\frac = \mathcal(\log(n))]
Inequalities
Some inequalities involving the [\phi] function are:- [\varphi(n) > \frac }] for n > 2, where γ is Euler's constant,
- [\varphi(n) \ge \sqrt }] for n > 0,
- [\varphi(n) \ge \sqrt] for n > 6.
- [\varphi(n) \le n-\sqrt] (for composite n).
- [0<\frac<1 ]
- [\lim \inf \frac=0 \mbox \lim \sup \frac=1. ]
- [\frac < \varphi(n) \sigma(n) < n^2\mbox n>1.]
See also
- Nontotient
- Noncototient
- Highly totient number
- Sparsely totient number
- Highly cototient number
- Divisor function
References
- Milton Abramowitz and Irene A. Stegun, Handbook of Mathematical Functions, (1964) Dover Publications, New York. ISBN 486-61272-4 . See paragraph 24.3.2.
- Eric Bach and Jeffrey Shallit, Algorithmic Number Theory, volume 1, 1996, MIT Press. ISBN 0-262-02405-5, see page 234 in section 8.8.
- Kirby Urner, [Computing totient function in Python and scheme], (2003)
From Wikipedia, the Free Encyclopedia. Original article here. Support Wikipedia by contributing or donating.
All text is available under the terms of the GNU Free Documentation License See Wikipedia Copyrights for details.
