login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A284250
Number of subsets of [n] whose sum is a triangular number.
5
1, 2, 3, 5, 7, 11, 18, 29, 49, 85, 151, 271, 493, 904, 1674, 3118, 5835, 10966, 20698, 39187, 74413, 141684, 270386, 517110, 990889, 1902108, 3657241, 7042490, 13580079, 26220417, 50687371, 98095126, 190042856, 368539253, 715349145, 1389731960, 2702098563
OFFSET
0,2
LINKS
FORMULA
a(n) = Sum_{k=0..n} A284249(n,k).
MAPLE
b:= proc(n, s) option remember; `if`(n=0,
`if`(issqr(8*s+1), 1, 0), b(n-1, s)+b(n-1, s+n))
end:
a:= n-> b(n, 0):
seq(a(n), n=0..40);
MATHEMATICA
b[n_, s_] := b[n, s] = If[n == 0,
If[IntegerQ@Sqrt[8*s + 1], 1, 0], b[n - 1, s] + b[n - 1, s + n]];
a[n_] := b[n, 0];
Table[a[n], {n, 0, 40}] (* Jean-François Alcover, Mar 17 2022, after Alois P. Heinz *)
CROSSREFS
Row sums of A284249.
Cf. A126024.
Sequence in context: A067904 A018146 A293637 * A291660 A069749 A081889
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Mar 23 2017
STATUS
approved