OFFSET
0,2
COMMENTS
Also: Number of columns with distinct entries in all compositions of n.
A 2-composition of n is a nonnegative matrix with two rows, such that each column has at least one nonzero entry and whose entries sum up to n.
LINKS
G. Castiglione, A. Frosini, E. Munarini, A. Restivo and S. Rinaldi, Combinatorial aspects of L-convex polyominoes, European Journal of Combinatorics, 28, 2007, 1724-1741.
Index entries for linear recurrences with constant coefficients, signature (7,-12,-4,12,-4).
FORMULA
G.f.: 2*z*(1-z)^2/((1+z)*(1-4z+2z^2)^2).
a(n) = 2*A181305(n). [R. J. Mathar, Oct 28 2010]
a(n) = 7*a(n-1)- 12*a(n-2)- 4*a(n-3)+12*a(n-4)-4*a(n-5). [Harvey P. Dale, Nov 11 2011]
EXAMPLE
a(2)=10 because in the 2-compositions of 2, namely (1/1),(0/2),(2/0), (1,0/0,1),(0,1/1,0),(1,1/0,0), and (0,0/1,1), we have 2+0+0+2+2+2+2=10 odd entries (the 2-compositions are written as (top row / bottom row)).
a(1)=2 because in (0/1) and (1/0) we have a total of 2 columns with distinct entries (the 2-compositions are written as (top row / bottom row).
MAPLE
g := 2*z*(1-z)^2/((1+z)*(1-4*z+2*z^2)^2): gser := series(g, z = 0, 30): seq(coeff(gser, z, n), n = 0 .. 25);
MATHEMATICA
CoefficientList[Series[(2x (1-x)^2)/((1+x)(1-4x+2x^2)^2), {x, 0, 30}], x] (* or *) LinearRecurrence[{7, -12, -4, 12, -4}, {0, 2, 10, 48, 208}, 30] (* Harvey P. Dale_, Nov 11 2011 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Emeric Deutsch, Oct 12 2010
EXTENSIONS
Merged with a definition concerning row sums of A181302 - R. J. Mathar, Oct 28 2010
STATUS
approved