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.

A336273 Number of compositions of n containing at least one part p of multiplicity p.

Original entry on oeis.org

0, 1, 0, 2, 3, 5, 14, 28, 44, 101, 207, 399, 779, 1609, 3122, 6121, 11804, 23631, 46273, 91604, 178096, 352419, 691996, 1371306, 2702206, 5356324, 10604748, 21080216, 41869930, 83383786, 166114046, 331434088, 661685588, 1322042390, 2642367028, 5283397304
Offset: 0

Views

Author

Alois P. Heinz, Jul 15 2020

Keywords

Crossrefs

Programs

  • Maple
    b:= proc(n, i, p) option remember; `if`(n=0, p!, `if`(i<1, 0,
          add(`if`(i=j, 0, b(n-i*j, i-1, p+j)/j!), j=0..n/i)))
        end:
    a:= n-> ceil(2^(n-1))-b(n$2, 0):
    seq(a(n), n=0..40);
  • Mathematica
    b[n_, i_, p_] := b[n, i, p] = If[n == 0, p!, If[i < 1, 0,
         Sum[If[i == j, 0, b[n - i*j, i - 1, p + j]/j!], {j, 0, n/i}]]];
    a[n_] := Ceiling[2^(n - 1)] - b[n, n, 0];
    Table[a[n], {n, 0, 40}] (* Jean-François Alcover, Apr 14 2022, after Alois P. Heinz *)

Formula

a(n) = A011782(n) - A336269(n).