OFFSET
0,2
COMMENTS
Start by enumerating the overpartitions of n, then allow the parts to vary their arrangements.
LINKS
Vaclav Kotesovec, Table of n, a(n) for n = 0..3000 (terms 0..1000 from Alois P. Heinz)
EXAMPLE
The A015128(4) = 14 overpartitions of 4 are: 4; 4'; 3,1; 3,1'; 3'1; 3',1', 2,2; 2',2; 2,1,1; 2,1',1; 2',1,1; 2',1',1; 1,1,1,1; and 1',1,1,1. The corresponding 36 compositions are 4; 4'; 3,1; 1,3; 3,1'; 1',3; 3',1; 1,3'; 3',1'; 1',3'; 2,2; 2,2'; 2',2; 2,1,1; 1,2,1; 1,1,2; 2,1,1'; 2,1',1; 1,2,1'; 1,1',2'; 1',1,2; 1',2,1; 2',1,1; 1,2',2; 1,1,2'; 2',1,1'; 2',1',1; 1,2',1'; 1,1',2'; 1',2',1; 1',1,2'; 1,1,1,1; 1,1,1,1'; 1,1,1',1; 1,1',1,1; and 1',1,1,1. Note: For a sequence of like parts p,p,...p, an overcomposition of n will only recognize p,p...p and p',p...,p; the p' is not allowed to be other than the initial p term.
MAPLE
b:= proc(n, i, p) option remember; `if`(n=0 or i=1, (p+n)!*
(1+n)/n!, add(b(n-i*j, i-1, p+j)*(1+j)/j!, j=0..n/i))
end:
a:= n-> b(n$2, 0):
seq(a(n), n=0..35); # Alois P. Heinz, Dec 26 2017
MATHEMATICA
b[n_, i_, p_] := b[n, i, p] = If[n == 0 || i == 1, (p + n)!*(n + 1)/n!, Sum[b[n - i*j, i - 1, p + j]*(j + 1)/j!, {j, 0, n/i}]];
a[n_] := b[n, n, 0];
Table[a[n], {n, 0, 35}] (* Jean-François Alcover, Dec 27 2017, after Alois P. Heinz *)
PROG
(PARI) {my(n=30); apply(p->subst(serlaplace(p), y, 1), Vec(prod(k=1, n, (1+y*x^k)*exp(y*x^k + O(x*x^n)))))} \\ Andrew Howroyd, Dec 26 2017
(Python)
from sympy.core.cache import cacheit
from sympy import factorial
@cacheit
def b(n, i, p): return factorial(p + n)*(n + 1)//factorial(n) if n==0 or i==1 else sum(b(n - i*j, i - 1, p + j)*(j + 1)//factorial(j) for j in range(n//i + 1))
def a(n): return b(n, n, 0)
print([a(n) for n in range(41)]) # Indranil Ghosh, Dec 29 2017, after Maple code
CROSSREFS
KEYWORD
nonn
AUTHOR
Gregory L. Simay, Dec 25 2017
EXTENSIONS
More terms from Alois P. Heinz, Dec 26 2017
STATUS
approved