OFFSET
1,2
COMMENTS
The n-th row of the triangular table begins by considering n triangular numbers (A000217) in order. Now segregate them into n groups beginning with n members in the first group, n-1 members in the second group, etc. Now sum each group. Thus the first term is the sum of first n numbers = n(n+1)/2, the second term is the sum of the next n-1 terms (from n+1 to 2n-1), the third term is the sum of the next n-2 terms (2n to 3n-3), etc. and the last term is simply n(n+1)/2. This triangle can be called a triangular triangle. The sequence contains the triangle by rows.
LINKS
Reinhard Zumkeller, Rows n = 1..100 of triangle, flattened
FORMULA
EXAMPLE
Triangle begins:
1
3, 3
6, 9, 6
10, 18, 17, 10
15, 30, 33, 27, 15
21, 45, 54, 51, 39, 21
28, 63, 80, 82, 72, 53, 28
36, 84, 111, 120, 114, 96, 69, 36
The row for n = 4 is (1+2+3+4), (5+6+7), (8+9), 10 => 10 18 17 10.
MAPLE
MATHEMATICA
T[n_] := n(n + 1)/2; TT[n_, k_] := T[k*n - T[k - 1]] - T[(k - 1)*n - T[k - 2]]; Flatten[ Table[ TT[n, k], {n, 1, 11}, {k, 1, n}]] (* Robert G. Wilson v, Apr 24 2004 *)
Table[Total/@TakeList[Range[(n(n+1))/2], Range[n, 1, -1]], {n, 20}]//Flatten (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Feb 15 2019 *)
PROG
(Haskell)
a093445 n k = a093445_row n !! (k-1)
a093445_row n = f [n, n - 1 .. 1] [1 ..] where
f [] _ = []
f (x:xs) ys = sum us : f xs vs where (us, vs) = splitAt x ys
a093445_tabl = map a093445_row [1 ..]
-- Reinhard Zumkeller, Oct 03 2012
CROSSREFS
KEYWORD
AUTHOR
Amarnath Murthy, Apr 02 2004
EXTENSIONS
Edited, corrected and extended by Robert G. Wilson v, Apr 24 2004
STATUS
approved