A192719 Chain of Collatz sequences.
1, 2, 1, 3, 10, 5, 16, 8, 4, 2, 1, 6, 3, 10, 5, 16, 8, 4, 2, 1, 7, 22, 11, 34, 17, 52, 26, 13, 40, 20, 10, 5, 16, 8, 4, 2, 1, 9, 28, 14, 7, 22, 11, 34, 17, 52, 26, 13, 40, 20, 10, 5, 16, 8, 4, 2, 1, 12, 6, 3, 10, 5, 16, 8, 4, 2, 1
Offset: 1
Examples
The first Collatz sequence in the chain is (1). The second Collatz sequence in the chain is (2, 1), which starts with 2, since 2 is the smallest positive integer that doesn't appear the first Collatz sequence. The third Collatz sequence in the chain is (3, 10, 5, 16, 8, 4, 2, 1), which starts with 3, since 3 is the smallest positive integer that doesn't appear the previous Collatz sequences. Thus this irregular array starts: 1; 2, 1; 3, 10, 5, 16, 8, 4, 2, 1; 6, 3, 10, 5, 16, 8, 4, 2, 1; 7, 22, 11, 34, 17, 52, 26, 13, 40, 20, 10, 5, 16, 8, 4, 2, 1; 9, 28, 14, 7, 22, 11, 34, 17, 52, 26, 13, 40, 20, 10, 5, 16, 8, 4, 2, 1; ...
Links
- Reinhard Zumkeller, Rows n = 1..120 of triangle, flattened
- Robert C. Lyons, Chain of Collatz sequences generator program in Java
- Index entries for sequences related to 3x+1 (or Collatz) problem
Crossrefs
Programs
-
Haskell
a192719 n k = a192719_tabf !! (n-1) !! (k-1) a192719_row n = a192719_tabf !! (n-1) a192719_tabf = f [1..] where f (x:xs) = (a070165_row x) : f (del xs $ a220237_row x) del us [] = us del us'@(u:us) vs'@(v:vs) | u > v = del us' vs | u < v = u : del us vs' | otherwise = del us vs -- Reinhard Zumkeller, Jan 03 2013
-
Java
See Lyons link.
Comments