Difference between revisions of "Euler's totient function"

Line 1: Line 1:
'''Euler's totient function''', <math>\phi(n)</math>, determines the number of integers less than a given positive integer that are [[relatively prime]] to that integer.
+
'''Euler's totient function''', <math>\phi(n)</math>, is defined as the number of positive integers less than or equal to a given positive integer that are [[relatively prime]] to that integer.
  
 
=== Formulas ===
 
=== Formulas ===
  
Given the [[prime factorization]] of <math>{n} = {p}_1^{e_1}{p}_2^{e_2} \cdots {p}_n^{e_n}</math>, then one formula for <math>\phi(n)</math> is <math> \phi(n) = n\left(1-\frac{1}{p_1}\right)\left(1-\frac{1}{p_2}\right) \cdots \left(1-\frac{1}{p_n}\right) </math>.
+
The formal definition is <math>\displaystyle \phi(n):=\# \left\{ a \in \mathbb{Z}: 1 \leq a \leq n , \gcd(a,n)=1 \right\} </math>.
 +
 
 +
Given the [[prime factorization]] of <math>{n} = {p}_1^{e_1}{p}_2^{e_2} \cdots {p}_n^{e_n}</math>, then another formula for <math>\phi(n)</math> is <math> \phi(n) = n\left(1-\frac{1}{p_1}\right)\left(1-\frac{1}{p_2}\right) \cdots \left(1-\frac{1}{p_n}\right) </math>.
  
 
=== Identities ===
 
=== Identities ===

Revision as of 04:08, 20 June 2006

Euler's totient function, $\phi(n)$, is defined as the number of positive integers less than or equal to a given positive integer that are relatively prime to that integer.

Formulas

The formal definition is $\displaystyle \phi(n):=\# \left\{ a \in \mathbb{Z}: 1 \leq a \leq n , \gcd(a,n)=1 \right\}$.

Given the prime factorization of ${n} = {p}_1^{e_1}{p}_2^{e_2} \cdots {p}_n^{e_n}$, then another formula for $\phi(n)$ is $\phi(n) = n\left(1-\frac{1}{p_1}\right)\left(1-\frac{1}{p_2}\right) \cdots \left(1-\frac{1}{p_n}\right)$.

Identities

For prime p, $\phi(p)=p-1$, because all numbers less than ${p}$ are relatively prime to it.

For relatively prime ${a}, {b}$, $\phi{(a)}\phi{(b)} = \phi{(ab)}$.

In fact, we also have for any ${a}, {b}$ that $\phi{(a)}\phi{(b)}\gcd(a,b)=\phi{(ab)}\phi({\gcd(a,b)})$.

For any $n$, we have $\sum_{d|n}\phi(d)=n$ where the sum is taken over all divisors d of $n$.

See also