OFFSET
0,2
COMMENTS
LINKS
T. D. Noe, Table of n, a(n) for n=0..500
Eric Weisstein's World of Mathematics, Collatz Problem.
EXAMPLE
a(5)=3 because the Collatz sequence 3,10,5,16,8,4,2,1 is the first sequence containing 5 halving steps.
MATHEMATICA
coll[n_]:= NestWhileList[If[EvenQ[#], #/2, 3#+1] &, n, #>1 &]; Table[i = 1; While[Count[coll[i], _?EvenQ] != n, i++]; i, {n, 0, 60}] (* Jayanta Basu, Jun 05 2013 *)
PROG
(Haskell)
import Data.List (elemIndex); import Data.Maybe (fromJust)
a092892 = (+ 1) . fromJust . (`elemIndex` a006666_list)
-- Reinhard Zumkeller, Mar 14 2014
CROSSREFS
KEYWORD
nonn,look
AUTHOR
Hugo Pfoertner, Mar 11 2004
STATUS
approved