OFFSET
1,3
COMMENTS
LINKS
Alois P. Heinz, Rows n = 1..15, flattened
EXAMPLE
The nonempty subsets of {1, 2, 3} are {1}, {2}, {3}, {1,2}, {1,3}, {2,3} and {1,2,3}, which have sums 1, 2, 3, 3, 4, 5 and 6 respectively, so these are the terms of row 3.
Triangle T(n,k) begins:
1;
1, 2, 3;
1, 2, 3, 3, 4, 5, 6;
1, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 9, 10;
...
MAPLE
T:= proc(n) option remember; `if`(n=0, [][], subsop(1=[][],
sort(map(x-> (x, x+n), [0, T(n-1)])))[])
end:
seq(T(n), n=1..7); # Alois P. Heinz, Jul 24 2019
MATHEMATICA
T[n_] := T[n] = Total /@ Subsets[Range[n], {1, n}] // Sort;
Array[T, 7] // Flatten (* Jean-François Alcover, Feb 14 2021 *)
CROSSREFS
KEYWORD
AUTHOR
Amarnath Murthy, Jul 06 2004
EXTENSIONS
Edited and extended by David Wasserman, Oct 04 2007
STATUS
approved