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
KEYWORD
nonn
AUTHOR
EXTENSIONS
Offset corrected by Reinhard Zumkeller, Nov 17 2013
STATUS
approved