OFFSET
1,2
COMMENTS
For n = 2^w, the sum is 2^(w+1) - 1.
LINKS
T. D. Noe, Table of n, a(n) for n = 1..10000
FORMULA
a(n) = n + a(phi(n)).
a(n) = A092693(n) + n. - Vladeta Jovovic, Jul 02 2004
EXAMPLE
If phi is applied repeatedly to n = 91, the iterates {91, 72, 24, 8, 4, 2, 1} are obtained. Their sum is a(91) = 91 + 72 + 24 + 8 + 4 + 2 + 1 = 202.
MATHEMATICA
f[n_] := Plus @@ Drop[ FixedPointList[ EulerPhi, n], -1]; Table[ f[n], {n, 66}] (* Robert G. Wilson v, Dec 16 2004 *)
f[1] := 1; f[n_] := n + f[EulerPhi[n]]; Table[f[n], {n, 66}] (* Carlos Eduardo Olivieri, May 26 2015 *)
PROG
(Haskell)
a053478 = (+ 1) . sum . takeWhile (/= 1) . iterate a000010
-- Reinhard Zumkeller, Oct 27 2011
(PARI) a(n)=my(s=n); while(n>1, s+=n=eulerphi(n)); s \\ Charles R Greathouse IV, Feb 21 2013
CROSSREFS
KEYWORD
nonn
AUTHOR
Labos Elemer, Jan 14 2000
STATUS
approved