Euler's totient function
In number theory, the totient of a positive integer n is defined to be the number of positive integers less than n which are coprime to n.
For example, since the four numbers 1, 3, 5 and 7 are coprime to 8. The function 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 () is so commonly used for it. The cototient of n is defined as .
The totient function is important mainly because it gives the size of the multiplicative group of integers modulo n. More precisely, is the order of the group of units of the ring . This fact, together with Lagrange's theorem, provides a proof for Euler's theorem.