login
This site is supported by donations to The OEIS Foundation.

 

Logo

Annual Appeal: Please make a donation (tax deductible in USA) to keep the OEIS running. Over 5000 articles have referenced us, often saying "we discovered this result with the help of the OEIS".

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A003434 Number of iterations of phi(x) at n needed to reach 1.
(Formerly M0244)
26

%I M0244

%S 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,

%T 5,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,

%U 6,5,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 Number of iterations of phi(x) at n needed to reach 1.

%C Each number n>1 occurs for the first time at the position A007755(n+1) and for the last time at 2*3^(n-1). - _Ivan Neretin_, Mar 24 2015

%D N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

%D M. V. Subbarao, On a function connected with phi(n), J. Madras Univ. B. 27 (1957), pp. 327-333.

%H T. D. Noe, <a href="/A003434/b003434.txt">Table of n, a(n) for n = 1..10000</a>

%H I. Niven, <a href="http://dx.doi.org/10.4153/CJM-1950-037-0">The iteration of certain arithmetic functions</a>, Canad. J. Math. 2 (1950), pp. 406-408.

%H S. Sivasankaranarayana Pillai, <a href="http://projecteuclid.org/euclid.bams/1183493597">On a function connected with phi(n)</a>, Bull. Amer. Math. Soc., 35:6 (1929), pp. 837-841.

%H H. N. Shapiro, <a href="http://dx.doi.org/10.1002/cpa.3160030304">On the iterates of a certain class of arithmetic functions</a>, Comm. Pure Appl. Math. 3 (1950), pp. 259-272.

%F a(n) = A049108(n) - 1.

%F 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

%F Pillai proved that log(n/2)/log(3) + 1 <= a(n) <= log(n)/log(2) + 1. - _Charles R Greathouse IV_, Mar 22, 2012

%e If n=164 the trajectory is {164,80,32,16,8,4,2,1}. Its length is 8, thus a(164)=7.

%t f[n_] := Length@ NestWhileList[ EulerPhi, n, # != 1 &] - 1; Array[f, 105] (* _Robert G. Wilson v_, Feb 07 2012 *)

%o (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. */ \\ _M. F. Hasler_, Jul 01 2009

%o (Haskell)

%o a003434 n = fst $ until ((== 1) . snd)

%o (\(i, x) -> (i + 1, a000010 x)) (0, n)

%o -- _Reinhard Zumkeller_, Feb 08 2013, Jul 03 2011

%Y Cf. A000010, A007755.

%K nonn,easy,nice,look

%O 1,3

%A _N. J. A. Sloane_

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy .

Last modified December 7 13:07 EST 2016. Contains 278875 sequences.