The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A259103 Number of steps to get from n to 1 by process of replacing with the Euler totient function phi if the result is odd, or dividing by 2 if even. 0
0, 1, 2, 2, 3, 3, 4, 3, 4, 4, 5, 4, 5, 5, 4, 4, 5, 5, 6, 5, 5, 6, 7, 5, 6, 6, 6, 6, 7, 5, 6, 5, 6, 6, 6, 6, 7, 7, 6, 6, 7, 6, 7, 7, 6, 8, 9, 6, 7, 7, 6, 7, 8, 7, 7, 7, 7, 8, 9, 6, 7, 7, 7, 6, 7, 7, 8, 7, 8, 7, 8, 7, 8, 8, 7, 8, 7, 7, 8, 7, 8, 8, 9, 7, 7, 8, 8 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,3
LINKS
EXAMPLE
a(7)= 4 because 7 -> phi(7)= 6 -> 3 -> phi(3)= 2 -> 1, hence the trajectory {7 -> 6 -> 3 -> 2 -> 1} with 4 iterations.
MATHEMATICA
f[n_]:=Module[{a=n, k=0}, While[a!=1, k++; If[EvenQ[a], a=a/2, a=EulerPhi[a]]]; k]; Table[f[n], {n, 1, 150}]
CROSSREFS
Cf. A000010.
Sequence in context: A139141 A122953 A259847 * A334200 A128998 A137813
KEYWORD
nonn,easy
AUTHOR
Michel Lagneau, Jul 07 2015
STATUS
approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 5 13:00 EDT 2024. Contains 373105 sequences. (Running on oeis4.)