|
|
A265853
|
|
a(0)=1; for n >= 1, a(n) is the number of subsets of [a(0), a(1), ..., a(n-1)] whose sum is equal to a(n-1).
|
|
2
|
|
|
1, 1, 2, 2, 3, 5, 6, 8, 11, 17, 25, 33, 41, 52, 80, 139, 204, 245, 289, 410, 692, 1159, 1477, 2010, 2769, 4247, 6128, 7709, 9817, 14071, 21982, 34892, 52079, 63998, 81167, 122709, 183662, 267520, 382690, 521361, 725601, 1050579, 1541163, 2084690, 2829408
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,3
|
|
LINKS
|
|
|
FORMULA
|
a(0) = 1; a(n) = [x^a(n-1)] Product_{k=0..n-1} (1 + x^a(k)). - Ilya Gutkovskiy, Jan 24 2024
|
|
EXAMPLE
|
a(4) = 3 because there are subsets of [1, 1, 2, 2] that sum to a(3) = 2: {1, 1}, {2}, {2}.
|
|
MAPLE
|
s:= proc(n) option remember; `if`(n<0, 0, s(n-1)+a(n)) end:
b:= proc(n, i) option remember; `if`(n=0, 1, `if`(s(i)<n, 0,
b(n, i-1)+ (p-> `if`(p>=0, b(p, i-1), 0))(n-a(i))))
end:
a:= n-> `if`(n=0, 1, b(a(n-1), n-1)):
|
|
MATHEMATICA
|
lst={1}; n=1; While[n<30, lst = Join[lst, {Length@Select[Total /@ Subsets[lst], #==Last[lst]&]}]; n++]
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|