Euler's totient function

Revision as of 23:25, 21 May 2025 by imported>ZergTwo (→‎Euler's product formula: That does not belong here.)
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)

Template:Short description Template:Hatnote group

File:EulerPhi.svg
CitationClass=web }}</ref>

In number theory, Euler's totient function counts the positive integers up to a given integer Template:Mvar that are relatively prime to Template:Mvar. It is written using the Greek letter phi as <math>\varphi(n)</math> or <math>\phi(n)</math>, and may also be called Euler's phi function. In other words, it is the number of integers Template:Mvar in the range Template:Math for which the greatest common divisor Template:Math is equal to 1.<ref>Template:Harvtxt</ref><ref>Template:Harvtxt</ref> The integers Template:Mvar of this form are sometimes referred to as totatives of Template:Mvar.

For example, the totatives of Template:Math are the six numbers 1, 2, 4, 5, 7 and 8. They are all relatively prime to 9, but the other three numbers in this range, 3, 6, and 9 are not, since Template:Math and Template:Math. Therefore, Template:Math. As another example, Template:Math since for Template:Math the only integer in the range from 1 to Template:Mvar is 1 itself, and Template:Math.

Euler's totient function is a multiplicative function, meaning that if two numbers Template:Mvar and Template:Mvar are relatively prime, then Template:Math.<ref>Template:Harvtxt</ref><ref>Template:Harvtxt</ref> This function gives the order of the [[multiplicative group of integers modulo n|multiplicative group of integers modulo Template:Mvar]] (the group of units of the ring <math>\Z/n\Z</math>).<ref>See Euler's theorem.</ref> It is also used for defining the RSA encryption system.

History, terminology, and notationEdit

Leonhard Euler introduced the function in 1763.<ref>L. Euler "Theoremata arithmetica nova methodo demonstrata" (An arithmetic theorem proved by a new method), Novi commentarii academiae scientiarum imperialis Petropolitanae (New Memoirs of the Saint-Petersburg Imperial Academy of Sciences), 8 (1763), 74–104. (The work was presented at the Saint-Petersburg Academy on October 15, 1759. A work with the same title was presented at the Berlin Academy on June 8, 1758). Available on-line in: Ferdinand Rudio, Template:Abbr, Leonhardi Euleri Commentationes Arithmeticae, volume 1, in: Leonhardi Euleri Opera Omnia, series 1, volume 2 (Leipzig, Germany, B. G. Teubner, 1915), pages 531–555. On page 531, Euler defines Template:Mvar as the number of integers that are smaller than Template:Mvar and relatively prime to Template:Mvar (... aequalis sit multitudini numerorum ipso N minorum, qui simul ad eum sint primi, ...), which is the phi function, φ(N).</ref><ref name="Sandifer, p. 203">Sandifer, p. 203</ref><ref>Graham et al. p. 133 note 111</ref> However, he did not at that time choose any specific symbol to denote it. In a 1784 publication, Euler studied the function further, choosing the Greek letter Template:Mvar to denote it: he wrote Template:Math for "the multitude of numbers less than Template:Mvar, and which have no common divisor with it".<ref>L. Euler, Speculationes circa quasdam insignes proprietates numerorum, Acta Academiae Scientarum Imperialis Petropolitinae, vol. 4, (1784), pp. 18–30, or Opera Omnia, Series 1, volume 4, pp. 105–115. (The work was presented at the Saint-Petersburg Academy on October 9, 1775).</ref> This definition varies from the current definition for the totient function at Template:Math but is otherwise the same. The now-standard notation<ref name="Sandifer, p. 203"/><ref>Both Template:Math and Template:Math are seen in the literature. These are two forms of the lower-case Greek letter phi.</ref> Template:Math comes from Gauss's 1801 treatise Disquisitiones Arithmeticae,<ref>Gauss, Disquisitiones Arithmeticae article 38</ref><ref>Template:Cite book</ref> although Gauss did not use parentheses around the argument and wrote Template:Math. Thus, it is often called Euler's phi function or simply the phi function.

In 1879, J. J. Sylvester coined the term totient for this function,<ref>J. J. Sylvester (1879) "On certain ternary cubic-form equations", American Journal of Mathematics, 2 : 357-393; Sylvester coins the term "totient" on page 361.</ref><ref>Template:Cite OED2</ref> so it is also referred to as Euler's totient function, the Euler totient, or Euler's totient.<ref>{{#invoke:citation/CS1|citation |CitationClass=web }}</ref> Jordan's totient is a generalization of Euler's.

The cototient of Template:Mvar is defined as Template:Math. It counts the number of positive integers less than or equal to Template:Mvar that have at least one prime factor in common with Template:Mvar.

Computing Euler's totient functionEdit

There are several formulae for computing Template:Math.

Euler's product formulaEdit

It states

<math>\varphi(n) =n \prod_{p\mid n} \left(1-\frac{1}{p}\right),</math>

where the product is over the distinct prime numbers dividing Template:Mvar.

An equivalent formulation is <math display="block">\varphi(n) = p_1^{k_1-1}(p_1{-}1)\,p_2^{k_2-1}(p_2{-}1)\cdots p_r^{k_r-1}(p_r{-}1),</math> where <math>n = p_1^{k_1} p_2^{k_2} \cdots p_r^{k_r}</math> is the prime factorization of <math>n</math> (that is, <math>p_1, p_2,\ldots,p_r</math> are distinct prime numbers).

The proof of these formulae depends on two important facts.

Phi is a multiplicative functionEdit

This means that if Template:Math, then Template:Math. Proof outline: Let Template:Mvar, Template:Mvar, Template:Mvar be the sets of positive integers which are coprime to and less than Template:Mvar, Template:Mvar, Template:Mvar, respectively, so that Template:Math, etc. Then there is a bijection between Template:Math and Template:Mvar by the Chinese remainder theorem.

Value of phi for a prime power argumentEdit

If Template:Mvar is prime and Template:Math, then

<math>\varphi \left(p^k\right) = p^k-p^{k-1} = p^{k-1}(p-1) = p^k \left( 1 - \tfrac{1}{p} \right).</math>

Proof: Since Template:Mvar is a prime number, the only possible values of Template:Math are Template:Math, and the only way to have Template:Math is if Template:Mvar is a multiple of Template:Mvar, that is, Template:Math, and there are Template:Math such multiples not greater than Template:Math. Therefore, the other Template:Math numbers are all relatively prime to Template:Math.

Proof of Euler's product formulaEdit

The fundamental theorem of arithmetic states that if Template:Math there is a unique expression <math>n = p_1^{k_1} p_2^{k_2} \cdots p_r^{k_r}, </math> where Template:Math are prime numbers and each Template:Math. (The case Template:Math corresponds to the empty product.) Repeatedly using the multiplicative property of Template:Mvar and the formula for Template:Math gives

<math>\begin{array} {rcl}

\varphi(n)&=& \varphi(p_1^{k_1})\, \varphi(p_2^{k_2}) \cdots\varphi(p_r^{k_r})\\[.1em] &=& p_1^{k_1} \left(1- \frac{1}{p_1} \right) p_2^{k_2} \left(1- \frac{1}{p_2} \right) \cdots p_r^{k_r}\left(1- \frac{1}{p_r} \right)\\[.1em] &=& p_1^{k_1} p_2^{k_2} \cdots p_r^{k_r} \left(1- \frac{1}{p_1} \right) \left(1- \frac{1}{p_2} \right) \cdots \left(1- \frac{1}{p_r} \right)\\[.1em] &=&n \left(1- \frac{1}{p_1} \right)\left(1- \frac{1}{p_2} \right) \cdots\left(1- \frac{1}{p_r} \right). \end{array}</math>

This gives both versions of Euler's product formula.

An alternative proof that does not require the multiplicative property instead uses the inclusion-exclusion principle applied to the set <math>\{1,2,\ldots,n\}</math>, excluding the sets of integers divisible by the prime divisors.

ExampleEdit

<math>\varphi(20)=\varphi(2^2 5)=20\,(1-\tfrac12)\,(1-\tfrac15)

=20\cdot\tfrac12\cdot\tfrac45=8.</math>

In words: the distinct prime factors of 20 are 2 and 5; half of the twenty integers from 1 to 20 are divisible by 2, leaving ten; a fifth of those are divisible by 5, leaving eight numbers coprime to 20; these are: 1, 3, 7, 9, 11, 13, 17, 19.

The alternative formula uses only integers:<math display="block">\varphi(20) = \varphi(2^2 5^1)= 2^{2-1}(2{-}1)\,5^{1-1}(5{-}1) = 2\cdot 1\cdot 1\cdot 4 = 8.</math>

Fourier transformEdit

The totient is the discrete Fourier transform of the gcd, evaluated at 1.<ref>Template:Harvtxt</ref> Let

<math> \mathcal{F} \{ \mathbf{x} \}[m] = \sum\limits_{k=1}^n x_k \cdot e^{{-2\pi i}\frac{mk}{n}}</math>

where Template:Math for Template:Math. Then

<math>\varphi (n) = \mathcal{F} \{ \mathbf{x} \}[1] = \sum\limits_{k=1}^n \gcd(k,n) e^{-2\pi i\frac{k}{n}}.</math>

The real part of this formula is

<math>\varphi (n)=\sum\limits_{k=1}^n \gcd(k,n) \cos {\tfrac{2\pi k}{n}}

.</math>

For example, using <math>\cos\tfrac{\pi}5 = \tfrac{\sqrt 5+1}4 </math> and <math>\cos\tfrac{2\pi}5 = \tfrac{\sqrt 5-1}4 </math>:<math display="block">\begin{array}{rcl} \varphi(10) &=& \gcd(1,10)\cos\tfrac{2\pi}{10} + \gcd(2,10)\cos\tfrac{4\pi}{10} + \gcd(3,10)\cos\tfrac{6\pi}{10}+\cdots+\gcd(10,10)\cos\tfrac{20\pi}{10}\\ &=& 1\cdot(\tfrac{\sqrt5+1}4) + 2\cdot(\tfrac{\sqrt5-1}4) + 1\cdot(-\tfrac{\sqrt5-1}4) + 2\cdot(-\tfrac{\sqrt5+1}4) + 5\cdot (-1) \\ && +\ 2\cdot(-\tfrac{\sqrt5+1}4) + 1\cdot(-\tfrac{\sqrt5-1}4) + 2\cdot(\tfrac{\sqrt5-1}4) + 1\cdot(\tfrac{\sqrt5+1}4) + 10 \cdot (1) \\ &=& 4 . \end{array} </math>Unlike the Euler product and the divisor sum formula, this one does not require knowing the factors of Template:Mvar. However, it does involve the calculation of the greatest common divisor of Template:Mvar and every positive integer less than Template:Mvar, which suffices to provide the factorization anyway.

Divisor sumEdit

The property established by Gauss,<ref>Gauss, DA, art 39</ref> that

<math>\sum_{d\mid n}\varphi(d)=n,</math>

where the sum is over all positive divisors Template:Mvar of Template:Mvar, can be proven in several ways. (See Arithmetical function for notational conventions.)

One proof is to note that Template:Math is also equal to the number of possible generators of the cyclic group Template:Math ; specifically, if Template:Math with Template:Math, then Template:Math is a generator for every Template:Mvar coprime to Template:Mvar. Since every element of Template:Math generates a cyclic subgroup, and each subgroup Template:Math is generated by precisely Template:Math elements of Template:Math, the formula follows.<ref>Gauss, DA art. 39, arts. 52-54</ref> Equivalently, the formula can be derived by the same argument applied to the [[Root of unity#Group of nth roots of unity|multiplicative group of the Template:Mvarth roots of unity]] and the [[primitive root of unity|primitive Template:Mvarth roots of unity]].

The formula can also be derived from elementary arithmetic.<ref>Graham et al. pp. 134-135</ref> For example, let Template:Math and consider the positive fractions up to 1 with denominator 20:

<math>
\tfrac{ 1}{20},\,\tfrac{ 2}{20},\,\tfrac{ 3}{20},\,\tfrac{ 4}{20},\,
\tfrac{ 5}{20},\,\tfrac{ 6}{20},\,\tfrac{ 7}{20},\,\tfrac{ 8}{20},\,
\tfrac{ 9}{20},\,\tfrac{10}{20},\,\tfrac{11}{20},\,\tfrac{12}{20},\,
\tfrac{13}{20},\,\tfrac{14}{20},\,\tfrac{15}{20},\,\tfrac{16}{20},\,
\tfrac{17}{20},\,\tfrac{18}{20},\,\tfrac{19}{20},\,\tfrac{20}{20}.

</math>

Put them into lowest terms:

<math>
\tfrac{ 1}{20},\,\tfrac{ 1}{10},\,\tfrac{ 3}{20},\,\tfrac{ 1}{ 5},\,
\tfrac{ 1}{ 4},\,\tfrac{ 3}{10},\,\tfrac{ 7}{20},\,\tfrac{ 2}{ 5},\,
\tfrac{ 9}{20},\,\tfrac{ 1}{ 2},\,\tfrac{11}{20},\,\tfrac{ 3}{ 5},\,
\tfrac{13}{20},\,\tfrac{ 7}{10},\,\tfrac{ 3}{ 4},\,\tfrac{ 4}{ 5},\,
\tfrac{17}{20},\,\tfrac{ 9}{10},\,\tfrac{19}{20},\,\tfrac{1}{1}

</math>

These twenty fractions are all the positive Template:Sfrac ≤ 1 whose denominators are the divisors Template:Math. The fractions with 20 as denominator are those with numerators relatively prime to 20, namely Template:Sfrac, Template:Sfrac, Template:Sfrac, Template:Sfrac, Template:Sfrac, Template:Sfrac, Template:Sfrac, Template:Sfrac; by definition this is Template:Math fractions. Similarly, there are Template:Math fractions with denominator 10, and Template:Math fractions with denominator 5, etc. Thus the set of twenty fractions is split into subsets of size Template:Math for each Template:Math dividing 20. A similar argument applies for any n.

Möbius inversion applied to the divisor sum formula gives

<math> \varphi(n) = \sum_{d\mid n} \mu\left( d \right) \cdot \frac{n}{d} = n\sum_{d\mid n} \frac{\mu (d)}{d},</math>

where Template:Mvar is the Möbius function, the multiplicative function defined by <math>\mu(p) = -1</math> and <math> \mu(p^k) = 0</math> for each prime Template:Math and Template:Math. This formula may also be derived from the product formula by multiplying out <math display="inline"> \prod_{p\mid n} (1 - \frac{1}{p}) </math> to get <math display="inline"> \sum_{d \mid n} \frac{\mu (d)}{d}. </math>

An example:<math display="block">

\begin{align}

\varphi(20) &= \mu(1)\cdot 20 + \mu(2)\cdot 10 +\mu(4)\cdot 5 +\mu(5)\cdot 4 + \mu(10)\cdot 2+\mu(20)\cdot 1\\[.5em] &= 1\cdot 20 - 1\cdot 10 + 0\cdot 5 - 1\cdot 4 + 1\cdot 2 + 0\cdot 1 = 8. \end{align} </math>

Some valuesEdit

The first 100 values (sequence A000010 in the OEIS) are shown in the table and graph below:

File:EulerPhi100.svg
Graph of the first 100 values
Template:Math for Template:Math
+ 1 2 3 4 5 6 7 8 9 10
0 1 1 2 2 4 2 6 4 6 4
10 10 4 12 6 8 8 16 6 18 8
20 12 10 22 8 20 12 18 12 28 8
30 30 16 20 16 24 12 36 18 24 16
40 40 12 42 20 24 22 46 16 42 20
50 32 24 52 18 40 24 36 28 58 16
60 60 30 36 32 48 20 66 32 44 24
70 70 24 72 36 40 36 60 24 78 32
80 54 40 82 24 64 42 56 40 88 24
90 72 44 60 46 72 32 96 42 60 40

In the graph at right the top line Template:Math is an upper bound valid for all Template:Mvar other than one, and attained if and only if Template:Mvar is a prime number. A simple lower bound is <math>\varphi(n) \ge \sqrt{n/2} </math>, which is rather loose: in fact, the lower limit of the graph is proportional to Template:Math.<ref name="hw328"/>

Euler's theoremEdit

Template:Main article

This states that if Template:Mvar and Template:Mvar are relatively prime then

<math> a^{\varphi(n)} \equiv 1\mod n.</math>

The special case where Template:Mvar is prime is known as Fermat's little theorem.

This follows from Lagrange's theorem and the fact that Template:Math is the order of the [[multiplicative group of integers modulo n|multiplicative group of integers modulo Template:Mvar]].

The RSA cryptosystem is based on this theorem: it implies that the inverse of the function Template:Math, where Template:Mvar is the (public) encryption exponent, is the function Template:Math, where Template:Mvar, the (private) decryption exponent, is the multiplicative inverse of Template:Mvar modulo Template:Math. The difficulty of computing Template:Math without knowing the factorization of Template:Mvar is thus the difficulty of computing Template:Mvar: this is known as the RSA problem which can be solved by factoring Template:Mvar. The owner of the private key knows the factorization, since an RSA private key is constructed by choosing Template:Mvar as the product of two (randomly chosen) large primes Template:Mvar and Template:Mvar. Only Template:Mvar is publicly disclosed, and given the difficulty to factor large numbers we have the guarantee that no one else knows the factorization.

Other formulaeEdit

  • <math>a\mid b \implies \varphi(a)\mid\varphi(b)</math>
  • <math> m \mid \varphi(a^m-1)</math>
  • <math>\varphi(mn) = \varphi(m)\varphi(n)\cdot\frac{d}{\varphi(d)} \quad\text{where }d = \operatorname{gcd}(m,n)</math>

    In particular:

    • <math>\varphi(2m) = \begin{cases}

    2\varphi(m) &\text{ if } m \text{ is even} \\ \varphi(m) &\text{ if } m \text{ is odd} \end{cases}</math>

    • <math>\varphi\left(n^m\right) = n^{m-1}\varphi(n)</math>
  • <math>\varphi(\operatorname{lcm}(m,n))\cdot\varphi(\operatorname{gcd}(m,n)) = \varphi(m)\cdot\varphi(n)</math>

    Compare this to the formula <math display=inline>\operatorname{lcm}(m,n)\cdot \operatorname{gcd}(m,n) = m \cdot n</math> (see least common multiple).

  • Template:Math is even for Template:Math.

    Moreover, if Template:Mvar has Template:Mvar distinct odd prime factors, Template:Math

  • For any Template:Math and Template:Math such that Template:Math there exists an Template:Math such that Template:Math.
  • <math>\frac{\varphi(n)}{n}=\frac{\varphi(\operatorname{rad}(n))}{\operatorname{rad}(n)}</math>

    where Template:Math is the [[radical of an integer|radical of Template:Mvar]] (the product of all distinct primes dividing Template:Mvar).

  • <math>\sum_{d \mid n} \frac{\mu^2(d)}{\varphi(d)} = \frac{n}{\varphi(n)}</math> <ref>Dineva (in external refs), prop. 1</ref>
  • <math>\sum_{1\le k\le n-1 \atop gcd(k,n)=1}\!\!k = \tfrac12 n\varphi(n) \quad \text{for }n>1</math>
  • <math>\sum_{k=1}^n\varphi(k) = \tfrac12 \left(1+ \sum_{k=1}^n \mu(k)\left\lfloor\frac{n}{k}\right\rfloor^2\right) =\frac3{\pi^2}n^2+O\left(n(\log n)^\frac23(\log\log n)^\frac43\right)</math> (<ref name=Wal1963>Template:Cite book</ref> cited in<ref>Template:Citation</ref>)
  • <math>\sum_{k=1}^n\varphi(k) =\frac3{\pi^2}n^2+O\left(n(\log n)^\frac23(\log\log n)^\frac13\right) </math> [Liu (2016)]
  • <math>\sum_{k=1}^n\frac{\varphi(k)}{k} = \sum_{k=1}^n\frac{\mu(k)}{k}\left\lfloor\frac{n}{k}\right\rfloor=\frac6{\pi^2}n+O\left((\log n)^\frac23(\log\log n)^\frac43\right)</math> <ref name="Wal1963" />
  • <math>\sum_{k=1}^n\frac{k}{\varphi(k)} = \frac{315\,\zeta(3)}{2\pi^4}n-\frac{\log n}2+O\left((\log n)^\frac23\right)</math> <ref name="Sita">Template:Cite journal</ref>
  • <math>\sum_{k=1}^n\frac{1}{\varphi(k)} = \frac{315\,\zeta(3)}{2\pi^4}\left(\log n+\gamma-\sum_{p\text{ prime}}\frac{\log p}{p^2-p+1}\right)+O\left(\frac{(\log n)^\frac23}n\right)</math> <ref name="Sita" />

    (where Template:Mvar is the Euler–Mascheroni constant).

Menon's identityEdit

Template:Main article In 1965 P. Kesava Menon proved

<math>\sum_{\stackrel{1\le k\le n}{ \gcd(k,n)=1}} \!\!\!\! \gcd(k-1,n)=\varphi(n)d(n),</math>

where Template:Math is the number of divisors of Template:Mvar.

Divisibility by any fixed positive integerEdit

The following property, which is part of the « folklore » (i.e., apparently unpublished as a specific result:<ref> Template:Citation</ref> see the introduction of this article in which it is stated as having « long been known ») has important consequences. For instance it rules out uniform distribution of the values of <math>\varphi(n)</math> in the arithmetic progressions modulo <math>q</math> for any integer <math>q>1</math>.

  • For every fixed positive integer <math>q</math>, the relation <math>q|\varphi(n)</math> holds for almost all <math>n</math>, meaning for all but <math>o(x)</math> values of <math>n\le x</math> as <math>x\rightarrow\infty</math>.

This is an elementary consequence of the fact that the sum of the reciprocals of the primes congruent to 1 modulo <math>q</math> diverges, which itself is a corollary of the proof of Dirichlet's theorem on arithmetic progressions.

Generating functionsEdit

The Dirichlet series for Template:Math may be written in terms of the Riemann zeta function as:<ref>Template:Harvnb</ref>

<math>\sum_{n=1}^\infty \frac{\varphi(n)}{n^s}=\frac{\zeta(s-1)}{\zeta(s)}</math>

where the left-hand side converges for <math>\Re (s)>2</math>.

The Lambert series generating function is<ref>Template:Harvnb</ref>

<math>\sum_{n=1}^{\infty} \frac{\varphi(n) q^n}{1-q^n}= \frac{q}{(1-q)^2}</math>

which converges for Template:Math.

Both of these are proved by elementary series manipulations and the formulae for Template:Math.

Growth rateEdit

In the words of Hardy & Wright, the order of Template:Math is "always 'nearly Template:Mvar'."<ref>Template:Harvnb</ref>

First<ref>Template:Harvnb</ref>

<math>\lim\sup \frac{\varphi(n)}{n}= 1,</math>

but as n goes to infinity,<ref>Template:Harvnb</ref> for all Template:Math

<math>\frac{\varphi(n)}{n^{1-\delta}}\rightarrow\infty.</math>

These two formulae can be proved by using little more than the formulae for Template:Math and the divisor sum function Template:Math.

In fact, during the proof of the second formula, the inequality

<math>\frac {6}{\pi^2} < \frac{\varphi(n) \sigma(n)}{n^2} < 1,</math>

true for Template:Math, is proved.

We also have<ref name="hw328">Template:Harvnb</ref>

<math>\lim\inf\frac{\varphi(n)}{n}\log\log n = e^{-\gamma}.</math>

Here Template:Mvar is Euler's constant, Template:Math, so Template:Math and Template:Math.

Proving this does not quite require the prime number theorem.<ref>In fact Chebyshev's theorem (Template:Harvnb) and Mertens' third theorem is all that is needed.</ref><ref>Template:Harvnb</ref> Since Template:Math goes to infinity, this formula shows that

<math>\lim\inf\frac{\varphi(n)}{n}= 0.</math>

In fact, more is true.<ref>Theorem 15 of Template:Cite journal</ref><ref>Bach & Shallit, thm. 8.8.7</ref><ref name=Rib320>Template:Cite book</ref>

<math>\varphi(n) > \frac {n} {e^\gamma\; \log \log n + \frac {3} {\log \log n}} \quad\text{for } n>2</math>

and

<math>\varphi(n) < \frac {n} {e^{ \gamma}\log \log n} \quad\text{for infinitely many } n.</math>

The second inequality was shown by Jean-Louis Nicolas. Ribenboim says "The method of proof is interesting, in that the inequality is shown first under the assumption that the Riemann hypothesis is true, secondly under the contrary assumption."<ref name=Rib320/>Template:Rp

For the average order, we have<ref name=Wal1963/><ref name=SMC2425>Sándor, Mitrinović & Crstici (2006) pp.24–25</ref>

<math>\varphi(1)+\varphi(2)+\cdots+\varphi(n) = \frac{3n^2}{\pi^2}+O\left(n(\log n)^\frac23(\log\log n)^\frac43\right) \quad\text{as }n\rightarrow\infty,</math>

due to Arnold Walfisz, its proof exploiting estimates on exponential sums due to I. M. Vinogradov and N. M. Korobov. By a combination of van der Corput's and Vinogradov's methods, H.-Q. Liu (On Euler's function.Proc. Roy. Soc. Edinburgh Sect. A 146 (2016), no. 4, 769–775) improved the error term to

<math>

O\left(n(\log n)^\frac23(\log\log n)^\frac13\right) </math> (this is currently the best known estimate of this type). The [[Big O notation|"Big Template:Mvar"]] stands for a quantity that is bounded by a constant times the function of Template:Mvar inside the parentheses (which is small compared to Template:Math).

This result can be used to prove<ref>Template:Harvnb</ref> that the probability of two randomly chosen numbers being relatively prime is Template:Sfrac.

Ratio of consecutive valuesEdit

In 1950 Somayajulu proved<ref name=Rib38>Ribenboim, p.38</ref><ref name=SMC16>Sándor, Mitrinović & Crstici (2006) p.16</ref>

<math>\begin{align}

\lim\inf \frac{\varphi(n+1)}{\varphi(n)}&= 0 \quad\text{and} \\[5px] \lim\sup \frac{\varphi(n+1)}{\varphi(n)}&= \infty. \end{align}</math>

In 1954 Schinzel and Sierpiński strengthened this, proving<ref name=Rib38/><ref name=SMC16/> that the set

<math>\left\{\frac{\varphi(n+1)}{\varphi(n)},\;\;n = 1,2,\ldots\right\}</math>

is dense in the positive real numbers. They also proved<ref name=Rib38/> that the set

<math>\left\{\frac{\varphi(n)}{n},\;\;n = 1,2,\ldots\right\}</math>

is dense in the interval (0,1).

Totient numberEdit

A totient number is a value of Euler's totient function: that is, an Template:Mvar for which there is at least one Template:Mvar for which Template:Math. The valency or multiplicity of a totient number Template:Mvar is the number of solutions to this equation.<ref name=Guy144>Guy (2004) p.144</ref> A nontotient is a natural number which is not a totient number. Every odd integer exceeding 1 is trivially a nontotient. There are also infinitely many even nontotients,<ref name=SC230>Sándor & Crstici (2004) p.230</ref> and indeed every positive integer has a multiple which is an even nontotient.<ref name=Zha1993>Template:Cite journal</ref>

The number of totient numbers up to a given limit Template:Mvar is

<math>\frac{x}{\log x}e^{ \big(C+o(1)\big)(\log\log\log x)^2 } </math>

for a constant Template:Math.<ref name=Ford1998>Template:Cite journal Reprinted in Analytic and Elementary Number Theory: A Tribute to Mathematical Legend Paul Erdos, Developments in Mathematics, vol. 1, 1998, {{#invoke:doi|main}}, Template:ISBN. Updated and corrected in Template:ArXiv, 2011.</ref>

If counted accordingly to multiplicity, the number of totient numbers up to a given limit Template:Mvar is

<math>\Big\vert\{ n : \varphi(n) \le x \}\Big\vert = \frac{\zeta(2)\zeta(3)}{\zeta(6)} \cdot x + R(x)</math>

where the error term Template:Mvar is of order at most Template:Math for any positive Template:Mvar.<ref name=SMC22>Sándor et al (2006) p.22</ref>

It is known that the multiplicity of Template:Mvar exceeds Template:Math infinitely often for any Template:Math.<ref name=SMC21>Sándor et al (2006) p.21</ref><ref name=Guy145>Guy (2004) p.145</ref>

Ford's theoremEdit

Template:Harvtxt proved that for every integer Template:Math there is a totient number Template:Mvar of multiplicity Template:Mvar: that is, for which the equation Template:Math has exactly Template:Mvar solutions; this result had previously been conjectured by Wacław Sierpiński,<ref name=SC229>Sándor & Crstici (2004) p.229</ref> and it had been obtained as a consequence of Schinzel's hypothesis H.<ref name=Ford1998/> Indeed, each multiplicity that occurs, does so infinitely often.<ref name=Ford1998/><ref name=Guy145/>

However, no number Template:Mvar is known with multiplicity Template:Math. Carmichael's totient function conjecture is the statement that there is no such Template:Mvar.<ref name=SC228>Sándor & Crstici (2004) p.228</ref>

Perfect totient numbersEdit

Template:Main article A perfect totient number is an integer that is equal to the sum of its iterated totients. That is, we apply the totient function to a number n, apply it again to the resulting totient, and so on, until the number 1 is reached, and add together the resulting sequence of numbers; if the sum equals n, then n is a perfect totient number.

ApplicationsEdit

CyclotomyEdit

Template:Main article

In the last section of the Disquisitiones<ref>Gauss, DA. The 7th § is arts. 336–366</ref><ref>Gauss proved if Template:Mvar satisfies certain conditions then the Template:Mvar-gon can be constructed. In 1837 Pierre Wantzel proved the converse, if the Template:Mvar-gon is constructible, then Template:Mvar must satisfy Gauss's conditions</ref> Gauss proves<ref>Gauss, DA, art 366</ref> that a regular Template:Mvar-gon can be constructed with straightedge and compass if Template:Math is a power of 2. If Template:Mvar is a power of an odd prime number the formula for the totient says its totient can be a power of two only if Template:Mvar is a first power and Template:Math is a power of 2. The primes that are one more than a power of 2 are called Fermat primes, and only five are known: 3, 5, 17, 257, and 65537. Fermat and Gauss knew of these. Nobody has been able to prove whether there are any more.

Thus, a regular Template:Mvar-gon has a straightedge-and-compass construction if n is a product of distinct Fermat primes and any power of 2. The first few such Template:Mvar are<ref>Gauss, DA, art. 366. This list is the last sentence in the Disquisitiones</ref>

2, 3, 4, 5, 6, 8, 10, 12, 15, 16, 17, 20, 24, 30, 32, 34, 40,... (sequence A003401 in the OEIS).

Prime number theorem for arithmetic progressionsEdit

Template:Main article

The RSA cryptosystemEdit

Template:Main article

Setting up an RSA system involves choosing large prime numbers Template:Mvar and Template:Mvar, computing Template:Math and Template:Math, and finding two numbers Template:Mvar and Template:Mvar such that Template:Math. The numbers Template:Mvar and Template:Mvar (the "encryption key") are released to the public, and Template:Mvar (the "decryption key") is kept private.

A message, represented by an integer Template:Mvar, where Template:Math, is encrypted by computing Template:Math.

It is decrypted by computing Template:Math. Euler's Theorem can be used to show that if Template:Math, then Template:Math.

The security of an RSA system would be compromised if the number Template:Mvar could be efficiently factored or if Template:Math could be efficiently computed without factoring Template:Mvar.

Unsolved problemsEdit

Lehmer's conjectureEdit

Template:Main article

If Template:Mvar is prime, then Template:Math. In 1932 D. H. Lehmer asked if there are any composite numbers Template:Mvar such that Template:Math divides Template:Math. None are known.<ref>Ribenboim, pp. 36–37.</ref>

In 1933 he proved that if any such Template:Mvar exists, it must be odd, square-free, and divisible by at least seven primes (i.e. Template:Math). In 1980 Cohen and Hagis proved that Template:Math and that Template:Math.<ref>Template:Cite journal</ref> Further, Hagis showed that if 3 divides Template:Mvar then Template:Math and Template:Math.<ref>Template:Cite journal</ref><ref name=Guy142>Guy (2004) p.142</ref>

Carmichael's conjectureEdit

Template:Main article

This states that there is no number Template:Mvar with the property that for all other numbers Template:Mvar, Template:Math, Template:Math. See Ford's theorem above.

As stated in the main article, if there is a single counterexample to this conjecture, there must be infinitely many counterexamples, and the smallest one has at least ten billion digits in base 10.<ref name=Guy144/>

Riemann hypothesisEdit

The Riemann hypothesis is true if and only if the inequality

<math>\frac{n}{\varphi (n)}<e^\gamma \log\log n+\frac{e^\gamma (4+\gamma-\log 4\pi)}{\sqrt{\log n}}</math>

is true for all Template:Math where Template:Mvar is Euler's constant and Template:Math is the product of the first Template:Math primes.<ref>Template:Cite book Corollary 5.35</ref>

See alsoEdit

NotesEdit

Template:Reflist

ReferencesEdit

Template:Refbegin

The Disquisitiones Arithmeticae has been translated from Latin into English and German. The German edition includes all of Gauss's papers on number theory: all the proofs of quadratic reciprocity, the determination of the sign of the Gauss sum, the investigations into biquadratic reciprocity, and unpublished notes.

References to the Disquisitiones are of the form Gauss, DA, art. nnn.

Template:Refend

External linksEdit

Template:Totient