|
|
A096137
|
|
Table read by rows: row n contains the sum of each nonempty subset of {1, 2, ..., n}. In each row, the sums are arranged in ascending order.
|
|
2
|
|
|
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, 1, 2, 3, 3, 4, 4, 5, 5, 5, 6, 6, 6, 7, 7, 7, 8, 8, 8, 9, 9, 9, 10, 10, 10, 11, 11, 12, 12, 13, 14, 15, 1, 2, 3, 3, 4, 4, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7, 8, 8, 8, 8, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 12
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,3
|
|
COMMENTS
|
The n-th row has 2^n-1 members. A001788 gives the row sums. The sums of the k-element subsets of {1, 2, ..., n} add up to A094305(n-1, k-1).
|
|
LINKS
|
|
|
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:
|
|
MATHEMATICA
|
T[n_] := T[n] = Total /@ Subsets[Range[n], {1, n}] // Sort;
|
|
CROSSREFS
|
|
|
KEYWORD
|
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|