OFFSET
1,2
COMMENTS
a(n) <= n. - Robert G. Wilson v, Jan 14 2015
LINKS
T. D. Noe, Table of n, a(n) for n=1..10000
Eric Weisstein's World of Mathematics, Collatz Sequence
MATHEMATICA
Collatz[n_] := NestWhileList[If[EvenQ[#], #/2, 3 # + 1] &, n, # > 1 &]; nn = 100; t = Table[0, {nn}]; n = 0; zeros = nn; While[zeros > 0, n++; c = Collatz[n]; Do[If[i <= nn && t[[i]] == 0, t[[i]] = n; zeros--], {i, c}]]; t (* T. D. Noe, Dec 03 2012 *)
PROG
(Haskell)
import Data.List (findIndex)
import Data.Maybe (fromJust)
a070167 n = fromJust (findIndex (elem n) a070165_tabf) + 1
-- Reinhard Zumkeller, Jan 02 2013
CROSSREFS
KEYWORD
nonn
AUTHOR
Eric W. Weisstein, Apr 23 2002
STATUS
approved