|
|
A139399
|
|
Number of steps to reach a cycle in Collatz problem.
|
|
9
|
|
|
0, 0, 5, 0, 3, 6, 14, 1, 17, 4, 12, 7, 7, 15, 15, 2, 10, 18, 18, 5, 5, 13, 13, 8, 21, 8, 109, 16, 16, 16, 104, 3, 24, 11, 11, 19, 19, 19, 32, 6, 107, 6, 27, 14, 14, 14, 102, 9, 22, 22, 22, 9, 9, 110, 110, 17, 30, 17, 30, 17, 17, 105, 105, 4, 25, 25, 25, 12, 12, 12, 100, 20, 113, 20
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,3
|
|
COMMENTS
|
a(n) = A006577(n) - 2 for n > 2 (if the conjecture holds).
|
|
LINKS
|
|
|
MATHEMATICA
|
f[n_] := If[EvenQ[n], n/2, 3 n + 1];
a[n_] := If[n<3, 0, Length[NestWhileList[f, n, {#1, #2, #3} != {4, 2, 1}&, 3]] - 3];
|
|
PROG
|
(Haskell)
a139399 = f 0 where
f k x = if x `elem` [1, 2, 4] then k else f (k + 1) (a006370 x)
|
|
CROSSREFS
|
Essentially the same sequence as A112695.
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|