OFFSET
1,1
COMMENTS
LINKS
Reinhard Zumkeller, Rows n = 1..100 of triangle, flattened
FORMULA
T(n,k) = 2^(n+1) - 2^(n-k) - 1, 1 <= k <= n.
EXAMPLE
Initial rows:
. 1: 2
. 2: 5 6
. 3: 11 13 14
. 4: 23 27 29 30
. 5: 47 55 59 61 62
. 6: 95 111 119 123 125 126
also in binary representation:
. 10
. 101 110
. 1011 1101 1110
. 10111 11011 11101 11110
. 101111 110111 111011 111101 111110
. 1011111 1101111 1110111 1111011 1111101 1111110 .
PROG
(Haskell)
a164874 n k = a164874_tabl !! (n-1) !! (k-1)
a164874_row n = a164874_tabl !! (n-1)
a164874_tabl = map reverse $ iterate f [2] where
f xs@(x:_) = (2 * x + 2) : map ((+ 1) . (* 2)) xs
-- Reinhard Zumkeller, Mar 31 2015
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Reinhard Zumkeller, Aug 29 2009
STATUS
approved