A342532 Number of even-length compositions of n with alternating parts distinct.
1, 0, 1, 2, 3, 4, 9, 14, 28, 44, 83, 136, 250, 424, 757, 1310, 2313, 4018, 7081, 12314, 21650, 37786, 66264, 115802, 202950, 354858, 621525, 1087252, 1903668, 3330882, 5831192, 10204250, 17862232, 31260222, 54716913, 95762576, 167614445, 293356422, 513456686
Offset: 0
Keywords
Examples
The a(2) = 1 through a(7) = 14 compositions: (1,1) (1,2) (1,3) (1,4) (1,5) (1,6) (2,1) (2,2) (2,3) (2,4) (2,5) (3,1) (3,2) (3,3) (3,4) (4,1) (4,2) (4,3) (5,1) (5,2) (1,1,2,2) (6,1) (1,2,2,1) (1,1,2,3) (2,1,1,2) (1,1,3,2) (2,2,1,1) (1,2,3,1) (1,3,2,1) (2,1,1,3) (2,3,1,1) (3,1,1,2) (3,2,1,1)
Links
- Andrew Howroyd, Table of n, a(n) for n = 0..500
Crossrefs
Programs
-
Mathematica
qdq[q_]:=And@@Table[q[[i]]!=q[[i+2]],{i,Length[q]-2}]; Table[Length[Select[Join@@Permutations/@Select[IntegerPartitions[n],EvenQ[Length[#]]&],qdq]],{n,0,15}]
-
PARI
\\ here gf gives A106351 as g.f. gf(n, y)={1/(1 - sum(k=1, n, (-1)^(k+1)*x^k*y^k/(1-x^k) + O(x*x^n)))} seq(n)={my(p=gf(n,y)); Vec(sum(k=0, n\2, polcoef(p,k,y)^2))} \\ Andrew Howroyd, Apr 16 2021
Formula
G.f.: 1 + Sum_{k>=1} B_k(x)^2 where B_k(x) is the g.f. of column k of A106351. - Andrew Howroyd, Apr 16 2021
Extensions
Terms a(24) and beyond from Andrew Howroyd, Apr 16 2021
Comments