OFFSET
1,4
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
J. Ziegenbalg, Phi, Tau, Sigma in Elementary Number Theory
FORMULA
EXAMPLE
For n=1: c(1) = 4. phi(4) = 2. tau(2)= 2, thus a(1) = 2 - 2 = 0.
For n=3: c(3) = 8. phi(8) = 4. tau(4)= 3, thus a(3) = 4 - 3 = 1.
For n=20: c(20) = 32. phi(32) = 16. tau(16) = 5, thus a(20) = 16 - 5 = 11.
MAPLE
comps:= remove(isprime, [$2..1000]):
map( ((t->t) - numtheory:-tau)@numtheory:-phi, comps); # Robert Israel, Nov 20 2016
MATHEMATICA
Composites := Select[Range[2, 10000], ! PrimeQ[#] &]; Composite[n_] := Last[Take[Composites, n]]; T[n_] := EulerPhi[n]; Table[T[Composite[n]] - DivisorSigma[0, T[Composite[n]]], {n, 200}]
EulerPhi[#]-DivisorSigma[0, EulerPhi[#]]&/@Select[Range[300], CompositeQ] (* Harvey P. Dale, Oct 05 2019 *)
PROG
(PARI) lista(nn) = {forcomposite(n=1, nn, ec = eulerphi(n); print1(ec - numdiv(ec), ", "); ); } \\ Michel Marcus, Jan 11 2015
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Carlos Eduardo Olivieri, Jan 02 2015
EXTENSIONS
Name clarified by Omar E. Pol, Nov 20 2016
STATUS
approved