OFFSET
1,3
COMMENTS
LINKS
T. D. Noe, Table of n, a(n) for n = 1..10000
MAPLE
A049865 := proc(n)
if n = 1 then
0 ;
else
1+procname( A047994(n)) ;
end if;
end proc: # R. J. Mathar, May 02 2013
MATHEMATICA
uphi[n_] := (f = FactorInteger[n]; Times @@ (f[[All, 1]]^f[[All, 2]] - 1)); uphi[n_ /; n <= 1] = 1; a[n_] := (k = 0; FixedPoint[ (k++; uphi[#]) & , n]; k-1); Table[a[n], {n, 1, 120}] (* Jean-François Alcover, Jan 20 2012 *)
PROG
(Haskell)
a049865 n = length $ takeWhile (> 1) $ iterate a047994 n
a049865_list = map a049865 [1..]
-- Reinhard Zumkeller, Aug 17 2011
CROSSREFS
KEYWORD
nonn,easy,nice
AUTHOR
STATUS
approved