%I A003434 M0244
%S A003434 0,1,2,2,3,2,3,3,3,3,4,3,4,3,4,4,5,3,4,4,4,4,5,4,5,4,4,4,5,4,5,5,5,5,5,
%T A003434 4,5,4,5,5,6,4,5,5,5,5,6,5,5,5,6,5,6,4,6,5,5,5,6,5,6,5,5,6,6,5,6,6,6,5,
%U A003434 6,5,6,5,6,5,6,5,6,6,5,6,7,5,7,5,6,6,7,5,6,6,6,6,6,6,7,5,6,6,7,6,7,6,6
%N A003434 Number of iterations of phi(n) needed to reach 1.
%D A003434 N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences,
Academic Press, 1995 (includes this sequence).
%D A003434 S. Sivasankaranarayana Pillai, On a function associated with phi(n),
Bull. Amer. Math. Soc., 35 (1929), 837-841.
%H A003434 T. D. Noe, <a href="b003434.txt">Table of n, a(n) for n = 1..10000</a>
%F A003434 By the definition of a(n) we have for n >= 2 the recursion a(n) = a(Phi(n))
+ 1. - Ahmed Fares (ahmedfares(AT)my-deja.com), Apr 20 2001
%e A003434 If n=164 the trajectory is {164,80,32,16,8,4,2,1}. Its length is 8, thus
a(164)=7.
%t A003434 f[n_] := Length[ NestWhileList[ EulerPhi, n, Unequal, 2]] - 2; Table[
f[n], {n, 1, 105} ]
%o A003434 (PARI) A003434(n)=for(k=0,n,n>1|return(k);n=eulerphi(n)) /* Works because
the loop limits are evaluated only once. Using while(...) takes 50%
more time. */ [From M. F. Hasler (MHasler(AT)univ-ag.fr), Jul 01
2009]
%Y A003434 Cf. A000010, A007755. Equals A049108 - 1.
%Y A003434 Sequence in context: A136510 A080071 A019569 this_sequence A097849 A100678
A026834
%Y A003434 Adjacent sequences: A003431 A003432 A003433 this_sequence A003435 A003436
A003437
%K A003434 nonn,easy,nice
%O A003434 1,3
%A A003434 N. J. A. Sloane (njas(AT)research.att.com).
|