A249111 Triangle of partial sums of rows in triangle A249095.
1, 1, 2, 3, 1, 2, 4, 5, 6, 1, 2, 5, 7, 10, 11, 12, 1, 2, 6, 9, 15, 18, 22, 23, 24, 1, 2, 7, 11, 21, 27, 37, 41, 46, 47, 48, 1, 2, 8, 13, 28, 38, 58, 68, 83, 88, 94, 95, 96, 1, 2, 9, 15, 36, 51, 86, 106, 141, 156, 177, 183, 190, 191, 192, 1, 2, 10, 17, 45, 66
Offset: 0
Examples
The triangle begins: . 0: 1 . 1: 1 2 3 . 2: 1 2 4 5 6 . 3: 1 2 5 7 10 11 12 . 4: 1 2 6 9 15 18 22 23 24 . 5: 1 2 7 11 21 27 37 41 46 47 48 . 6: 1 2 8 13 28 38 58 68 83 88 94 95 96 . 7: 1 2 9 15 36 51 86 106 141 156 177 183 190 191 192 . 8: 1 2 10 17 45 66 122 157 227 262 318 339 367 374 382 383 384 . It can be seen that the elements (except for row 1) are sum of the neighbors to the upper left and upper right, with the table continued to the left with 0's and to the right with the last = largest element of each row. E.g., 1=0+1, 2=0+2, 4=1+3, 5=2+3 (=1+4 in the next row), 6=3+3 (in row 2), 7=2+5 etc. - _M. F. Hasler_, Nov 17 2014
Links
- Reinhard Zumkeller, Rows n = 0..100 of triangle, flattened
Programs
-
Haskell
a249111 n k = a249111_tabf !! n !! k a249111_row n = a249111_tabf !! n a249111_tabf = map (scanl1 (+)) a249095_tabf
-
PARI
T(n,k)=if(k<2,k+1,if(k>=2*n-2,3<<(n-1),T(n-1,k-2)+T(n-1,k))) \\ M. F. Hasler, Nov 17 2014
Formula
T(n+1,k+1) = T(n,k-1) + T(n,k+1), with T(n,k-1)=0 for k<1 and T(n,k+1)=T(n,k) for k>=2n (last element of the row). In particular, T(n,k)=k+1 if k<2n and T(n,k)=3*2^(n-1) if k>=2n. - M. F. Hasler, Nov 17 2014
Comments