title: Totient summatory function
text: # Totient summatory function
  
  In number theory, the totient summatory function $\Phi (n)$ is a summatory function of Euler's totient function defined by:
  
      $\Phi (n):=\sum _{k=1}^{n}\varphi (k),\quad n\in \mathbf {N}$
  
  It is the number of coprime integer pairs {p, q}, 1 ≤ p ≤ q ≤ n.
  
  ## Properties
  
  Using Möbius inversion to the totient function, we obtain
  
      $\Phi (n)=\sum _{k=1}^{n}k\sum _{d\mid k}{\frac {\mu (d)}{d}}={\frac {1}{2}}\sum _{k=1}^{n}\mu (k)\left\lfloor {\frac {n}{k}}\right\rfloor \left(1+\left\lfloor {\frac {n}{k}}\right\rfloor \right)$
  
  Φ(n) has the asymptotic expansion
  
      $\Phi (n)\sim {\frac {1}{2\zeta (2)}}n^{2}+O\left(n\log n\right),$
  
  where ζ(2) is the Riemann zeta function for the value 2.
  
  Φ(n) is the number of coprime integer pairs {p, q}, 1 ≤ p ≤ q ≤ n.
  
  ## The summatory of reciprocal totient function
  
  The summatory of reciprocal totient function is defined as
  
      $S(n):=\sum _{k=1}^{n}{\frac {1}{\varphi (k)}}$
  
  Edmund Landau showed in 1900 that this function has the asymptotic behavior
  
      $S(n)\sim A(\gamma +\log n)+B+O\left({\frac {\log n}{n}}\right)$
  
  where γ is the Euler–Mascheroni constant,
  
      $A=\sum _{k=1}^{\infty }{\frac {\mu (k)^{2}}{k\varphi (k)}}={\frac {\zeta (2)\zeta (3)}{\zeta (6)}}=\prod _{p}\left(1+{\frac {1}{p(p-1)}}\right)$
  
  and
  
      $B=\sum _{k=1}^{\infty }{\frac {\mu (k)^{2}\log k}{k\,\varphi (k)}}=A\,\prod _{p}\left({\frac {\log p}{p^{2}-p+1}}\right).$
  
  The constant A = 1.943596... is sometimes known as Landau's totient constant. The sum $\textstyle \sum _{k=1}^{\infty }{\frac {1}{k\varphi (k)}}$ is convergent and equal to:
  
      $\sum _{k=1}^{\infty }{\frac {1}{k\varphi (k)}}=\zeta (2)\prod _{p}\left(1+{\frac {1}{p^{2}(p-1)}}\right)=2.20386\ldots$
  
  In this case, the product over the primes in the right side is a constant known as totient summatory constant, and its value is:
  
      $\prod _{p}\left(1+{\frac {1}{p^{2}(p-1)}}\right)=1.339784\ldots$
  