OFFSET
0,2
COMMENTS
Number of compositions of n into distinct parts of 2 kinds. a(3) = 10: 3, 3', 21, 21', 2'1, 2'1', 12, 12', 1'2, 1'2'. - Alois P. Heinz, Sep 05 2015
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..1000
C. G. Bower, Transforms (2)
Jacob Sprittulla, On Colored Factorizations, arXiv:2008.09984 [math.CO], 2020.
MAPLE
b:= proc(n, i, p) option remember;
`if`(n=0, p!, `if`(i<1, 0, b(n, i-1, p)+
`if`(i>n, 0, 2*b(n-i, i-1, p+1))))
end:
a:= n-> b(n$2, 0):
seq(a(n), n=0..40); # Alois P. Heinz, Sep 05 2015
MATHEMATICA
b[n_, i_, p_] := b[n, i, p] = If[n == 0, p!, If[i < 1, 0, b[n, i - 1, p] + If[i > n, 0, 2*b[n - i, i - 1, p + 1]]]];
a[n_] := b[n, n, 0];
a /@ Range[0, 40] (* Jean-François Alcover, Sep 11 2019, after Alois P. Heinz *)
PROG
(PARI) seq(n)={apply(p->subst(serlaplace(p), y, 1), Vec(prod(k=1, n, 1 + 2*x^k*y + O(x*x^n))))} \\ Andrew Howroyd, Jun 21 2018
CROSSREFS
KEYWORD
nonn
AUTHOR
EXTENSIONS
a(0)=1 prepended by Alois P. Heinz, Sep 05 2015
STATUS
approved