OFFSET
1,3
COMMENTS
LINKS
EXAMPLE
The table begins:
. 1: [1]
. 2: [1,2]
. 3: [1,2,3,4,5,8,10,16]
. 4: [1,2,4]
. 5: [1,2,4,5,8,16]
. 6: [1,2,3,4,5,6,8,10,16]
. 7: [1,2,4,5,7,8,10,11,13,16,17,20,22,26,34,40,52]
. 8: [1,2,4,8]
. 9: [1,2,4,5,7,8,9,10,11,13,14,16,17,20,22,26,28,34,40,52]
. 10: [1,2,4,5,8,10,16]
. 11: [1,2,4,5,8,10,11,13,16,17,20,26,34,40,52]
. 12: [1,2,3,4,5,6,8,10,12,16] .
MAPLE
T:= proc(n) option remember; `if`(n=1, 1,
sort([n, T(`if`(n::even, n/2, 3*n+1))])[])
end:
seq(T(n), n=1..10); # Alois P. Heinz, Oct 16 2021
MATHEMATICA
Flatten[Table[Sort[NestWhileList[If[EvenQ[#], #/2, 3#+1]&, n, #>1&]], {n, 12}]] (* Harvey P. Dale, Jan 28 2013 *)
PROG
(Haskell)
import Data.List (sort)
a220237 n k = a220237_tabf !! (n-1) !! (k-1)
a220237_row n = a220237_tabf !! (n-1)
a220237_tabf = map sort a070165_tabf
CROSSREFS
KEYWORD
AUTHOR
Reinhard Zumkeller, Jan 03 2013
STATUS
approved