cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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).

Original entry on oeis.org

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
Offset: 0

Views

Author

Melvin Peralta, Dec 21 2015

Keywords

Examples

			a(4) = 3 because there are subsets of [1, 1, 2, 2] that sum to a(3) = 2: {1, 1}, {2}, {2}.
		

Crossrefs

Cf. A057601.

Programs

  • 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) `if`(p>=0, b(p, i-1), 0))(n-a(i))))
        end:
    a:= n-> `if`(n=0, 1, b(a(n-1), n-1)):
    seq(a(n), n=0..44);  # Alois P. Heinz, Jan 24 2024
  • Mathematica
    lst={1};n=1;While[n<30, lst = Join[lst, {Length@Select[Total /@ Subsets[lst],#==Last[lst]&]}];n++]

Formula

a(0) = 1; a(n) = [x^a(n-1)] Product_{k=0..n-1} (1 + x^a(k)). - Ilya Gutkovskiy, Jan 24 2024

Extensions

More terms from Bert Dobbelaere, Oct 28 2018