# Greetings from The On-Line Encyclopedia of Integer Sequences! http://oeis.org/ Search: id:a297120 Showing 1-1 of 1 %I A297120 #38 May 03 2020 08:03:58 %S A297120 1,2,5,14,36,92,234,586,1452,3562,8674,20956,50290,119922,284308, %T A297120 670458,1573250,3674700,8546282,19796234,45681908,105041402,240723618, %U A297120 549919604,1252492674,2844551866,6442833156,14555300218,32801922154,73749649900,165443000338 %N A297120 Number of compositions derived from the overpartitions of n. %C A297120 Start by enumerating the overpartitions of n, then allow the parts to vary their arrangements. %H A297120 Vaclav Kotesovec, Table of n, a(n) for n = 0..3000 (terms 0..1000 from Alois P. Heinz) %e A297120 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. %p A297120 b:= proc(n, i, p) option remember; `if`(n=0 or i=1, (p+n)!* %p A297120 (1+n)/n!, add(b(n-i*j, i-1, p+j)*(1+j)/j!, j=0..n/i)) %p A297120 end: %p A297120 a:= n-> b(n$2, 0): %p A297120 seq(a(n), n=0..35); # _Alois P. Heinz_, Dec 26 2017 %t A297120 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}]]; %t A297120 a[n_] := b[n, n, 0]; %t A297120 Table[a[n], {n, 0, 35}] (* _Jean-François Alcover_, Dec 27 2017, after _Alois P. Heinz_ *) %o A297120 (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 %o A297120 (Python) %o A297120 from sympy.core.cache import cacheit %o A297120 from sympy import factorial %o A297120 @cacheit %o A297120 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)) %o A297120 def a(n): return b(n, n, 0) %o A297120 print([a(n) for n in range(41)]) # _Indranil Ghosh_, Dec 29 2017, after Maple code %Y A297120 Cf. A015128, A236002. %K A297120 nonn %O A297120 0,2 %A A297120 _Gregory L. Simay_, Dec 25 2017 %E A297120 More terms from _Alois P. Heinz_, Dec 26 2017 # Content is available under The OEIS End-User License Agreement: http://oeis.org/LICENSE