Totient Summatory Function

Author

Eric W. Weisstein
February 17, 2015

This notebook downloaded from http://mathworld.wolfram.com/notebooks/NumberTheoreticFunctions/TotientSummatoryFunction.nb.

For more information, see Eric's MathWorld entry http://mathworld.wolfram.com/TotientSummatoryFunction.html.

©2015 Wolfram Research, Inc. except for portions noted otherwise

Φ(n)

Table

Accumulate[EulerPhi[Range[10]]]

Plots

<<Utilities`Plot`

Show[Block[{$DisplayFunction=Identity},
{
IntegerListPlot[Rest@FoldList[Plus,0,EulerPhi[Range[50]]],AxesLabel->TraditionalForm/@{n,Φ[n]}],
Plot[3/Pi^2 x^2,{x,0,50},PlotStyle->Blue]
}
]]

Sums

(∑_k^n)(EulerPhi[k])==Φ(n)

V7

Sum[EulerPhi[k],{k,n}]

(∑_m^n)m DivisorSum[m,((MoebiusMu[#1])/(#1))&]==Φ(n)

V7

Sum[m DivisorSum[m,((MoebiusMu[#])/(#))&],{m,n}]

(∑_d^n)(MoebiusMu[d]) (∑_(d')^(⌊(n/d)⌋))d'==Φ(n)

Sum[dd,{dd,Floor[n/d]}]//FullSimplify

Table[Sum[MoebiusMu[d]Sum[dd,{dd,Floor[n/d]}],{d,n}],{n,10}]

(1/2) (∑_d^n)(MoebiusMu[d]) ⌊(n/d)⌋ (⌊(n/d)⌋+1)==Φ(n)

(1/2)Sum[MoebiusMu[d] Floor[(n/d)] (1+Floor[(n/d)]),{d,n}]

Sum[MoebiusMu[d]Sum[dd,{dd,Floor[n/d]}],{d,n}]

S(n)==(∑_(n=1)^∞)(1/(EulerPhi[n]))

Table

Rest@FoldList[Plus,0,1/EulerPhi[Range[10]]]//InputForm

Through[{Numerator,Denominator}[%]]

Infinite

NSum[(1/(EulerPhi[n])),{n,∞}]

Sum[((1`20)/(EulerPhi[n])),{n,1*^5}]//Timing

Sum[((1`20)/(EulerPhi[n])),{n,2*^5}]//Timing

V6

Sum[(1/(EulerPhi[n])),{n,∞}]

V7

Sum[(1/(EulerPhi[n])),{n,∞}]

Aymptotics

Finch, p. 116:

S(N)==A (log(N)+B)+O(((log(N))/N))

My version:

S(N)==A (log(N)+γ)-B+O(((log(N))/N))

Sum[1`20/EulerPhi[k],{k,1,10^6}]//Timing

N[Sum[1/EulerPhi[k],{k,1,10^6}],10]//Timing

Total[1/N[EulerPhi[Range[(10^6)]],20]]//Timing

With[{A=((315 Zeta[3])/(2 (π^4))),B=1.182448},A(Log[(10^6)]+EulerGamma)-B]

Total[1/N[EulerPhi[Range[(10^7)]],20]]//Timing

With[{A=((315 Zeta[3])/(2 (π^4))),B=1.182448},A(Log[(10^7)]+EulerGamma)-B]

A==(∑_k^∞)(((MoebiusMu[k])^2)/(k (EulerPhi[k])))==((315 Zeta[3])/(2 (π^4)))

Sum[((MoebiusMu[k]^2)/(k EulerPhi[k])),{k,∞}]//Timing

B==(∑_k^∞)((((MoebiusMu[k])^2) log(k))/(k (EulerPhi[k])))==A(∏_k^∞)((log((Prime[k])))/(((((Prime[k])))^2)+(Prime[k])+1))

Sum[((MoebiusMu[k]^2Log[k])/(k EulerPhi[k])),{k,∞}]//Timing

(N[Sum[((MoebiusMu[k]^2Log[k])/(k EulerPhi[k])),{k,10^5}],20])//Timing

(N[Sum[((MoebiusMu[k]^2Log[k])/(k EulerPhi[k])),{k,5 10^5}],20])//Timing

(N[Sum[((MoebiusMu[k]^2Log[k])/(k EulerPhi[k])),{k,10^6}],20])//Timing

Total[N[((Log[#])/(((#)^2)-#+1))&/@Prime[Range[(10^4)]]]]

Total[N[((Log[#])/(((#)^2)-#+1))&/@Prime[Range[(10^5)]],10]] ((315 Zeta[3])/(2 (π^4)))

Total[N[((Log[#])/(((#)^2)-#+1))&/@Prime[Range[(10^6)]],10]] ((315 Zeta[3])/(2 (π^4)))//Timing

Total[((Log[#])/(((#)^2)-#+1))&/@N[Prime[Range[(10^6)]],20]] ((315 Zeta[3])/(2 (π^4)))//Timing

Total[((Log[#])/(((#)^2)-#+1))&/@N[Prime[Range[(10^7)]],20]] ((315 Zeta[3])/(2 (π^4)))//Timing

Plot

Show[Block[{$DisplayFunction=Identity},
{
IntegerListPlot[Rest@FoldList[Plus,0,1/EulerPhi[Range[50]]],AxesLabel->TraditionalForm/@{n,S[n]}],
Plot[1.943596 Log[x]-.05955,{x,0,50},PlotStyle->Blue]
}
]]

(∑_(n=1)^∞)(1/(n ϕ(n)))

Table

Rest@FoldList[Plus,0,1/(#EulerPhi[#])&/@Range[10]]

Through[{Numerator,Denominator}[%]]

V6

Sum[(1/(n EulerPhi[n])),{n,∞}]

V7

Sum[(1/(n EulerPhi[n])),{n,∞}]

NSum[(1/(n EulerPhi[n])),{n,∞}]

Sum[((1`20)/(n EulerPhi[n])),{n,1*^6}]//Timing

Times@@(1`20+(1/(((#)^2)(#-1)))&[Prime[Range[10^4]]])//Timing

Zeta[2]Times@@(1`20+(1/(((#)^2)(#-1)))&[Prime[Range[10^4]]])//Timing