OFFSET
1,2
COMMENTS
Let h be the initial term of row n, to get row n+1, remove h and then append 2*h and 2*h+1;
A080079(n) = T(n,1); T(n,T(n,1)) = 1.
LINKS
Reinhard Zumkeller, Rows n = 1..128 of triangle, flattened
EXAMPLE
. 1: 1
. 2: 2 1
. 3: 1 4 3
. 4: 4 3 2 1
. 5: 3 2 1 8 7
. 6: 2 1 8 7 6 5
. 7: 1 8 7 6 5 4 3
. 8: 8 7 6 5 4 3 2 1
. 9: 7 6 5 4 3 2 1 16 15
. 10: 6 5 4 3 2 1 16 15 14 13
. 11: 5 4 3 2 1 16 15 14 13 12 11
. 12: 4 3 2 1 16 15 14 13 12 11 10 9 .
PROG
(Haskell)
a240769 n k = a240769_tabl !! (n-1) !! (k-1)
a240769_row n = a240769_tabl !! (n-1)
a240769_tabl = iterate (\(x:xs) -> xs ++ [2*x, 2*x-1]) [1]
CROSSREFS
AUTHOR
Reinhard Zumkeller, Apr 13 2014
STATUS
approved