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

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A003434 Number of iterations of phi(n) needed to reach 1.
(Formerly M0244)
22
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, 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, 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 (list; graph; refs; listen; history; internal format)
OFFSET

1,3

REFERENCES

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

S. Sivasankaranarayana Pillai, On a function associated with phi(n), Bull. Amer. Math. Soc., 35 (1929), 837-841.

LINKS

T. D. Noe, Table of n, a(n) for n = 1..10000

FORMULA

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

log_3 n << a(n) << log_2 n. [Charles R Greathouse IV, Feb 07 2012]

EXAMPLE

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

MATHEMATICA

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

PROG

(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 (www.univ-ag.fr/~mhasler), Jul 01 2009]

(Haskell)

a003434 = length . takeWhile (/= 1) . (iterate a000010)

-- Reinhard Zumkeller, Jul 03 2011

CROSSREFS

Cf. A000010, A007755. Equals A049108 - 1.

Sequence in context: A080071 A202472 A019569 * A097849 A100678 A026834

Adjacent sequences:  A003431 A003432 A003433 * A003435 A003436 A003437

KEYWORD

nonn,easy,nice,changed

AUTHOR

N. J. A. Sloane (njas(AT)research.att.com).

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

Content is available under The OEIS End-User License Agreement .

Last modified February 16 12:41 EST 2012. Contains 205909 sequences.