The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A039637 Number of steps to fixed point of "n -> n/2 or (n+1)/2 until result is prime". 5
 1, 1, 1, 2, 1, 2, 1, 3, 2, 2, 1, 3, 1, 2, 4, 4, 1, 3, 1, 3, 2, 2, 1, 4, 2, 2, 3, 3, 1, 5, 1, 5, 2, 2, 4, 4, 1, 2, 4, 4, 1, 3, 1, 3, 2, 2, 1, 5, 3, 3, 3, 3, 1, 4, 4, 4, 2, 2, 1, 6, 1, 2, 6, 6, 3, 3, 1, 3, 5, 5, 1, 5, 1, 2, 3, 3, 5, 5, 1, 5, 2, 2, 1, 4, 2, 2, 4, 4, 1, 3, 3, 3, 2, 2, 6, 6, 1, 4, 4, 4, 1, 4 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,4 LINKS Reinhard Zumkeller, Table of n, a(n) for n = 1..10000 MATHEMATICA upplist[ n_Integer ] := Length/@Drop[ FixedPointList[ If[ EvenQ[ # ]&&#>2, #/ 2, If[ PrimeQ[ # ]||(#===1), #, (#+1)/2 ] ]&, n, 20 ], -1 ] PROG (Haskell) a039637 1 = 1 a039637 n = snd \$ until ((== 1) . a010051 . fst)                         (\(x, i) -> ((x + 1) `div` 2 , i + 1)) (n, 1) -- Reinhard Zumkeller, Nov 17 2013 CROSSREFS Cf. A039634-A039645. Cf. A010051, A039635, A039636, A039644, A039645. Sequence in context: A323436 A056692 A331600 * A194548 A274009 A069157 Adjacent sequences:  A039634 A039635 A039636 * A039638 A039639 A039640 KEYWORD nonn AUTHOR EXTENSIONS Offset corrected by Reinhard Zumkeller, Nov 17 2013 STATUS approved

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

Last modified July 28 19:33 EDT 2021. Contains 346335 sequences. (Running on oeis4.)