OFFSET
0,3
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..1000
FORMULA
G.f.: (1 + Sum_{k>0} (x^k)/(1 + x^(2*k)))/(1 - Sum_{k>0} (x^(2*k))/(1 + x^(2*k))). - John Tyler Rascoe, May 28 2024
EXAMPLE
The a(1) = 1 through a(8) = 9 compositions:
(1) (2) (3) (4) (5) (6) (7) (8)
(11) (22) (113) (33) (115) (44)
(112) (221) (114) (223) (116)
(1122) (331) (224)
(2211) (11221) (332)
(1133)
(3311)
(22112)
(112211)
MATHEMATICA
Table[Length[Select[Join@@Permutations/@IntegerPartitions[n], And@@Table[#[[i]]==#[[i+1]], {i, 1, Length[#]-1, 2}]&&And@@Table[#[[i]]!=#[[i+1]], {i, 2, Length[#]-1, 2}]&]], {n, 0, 15}]
PROG
(PARI)
C_x(N) = {my(x='x+O('x^N), h=(1+sum(k=1, N, (x^k)/(1+x^(2*k))))/(1-sum(k=1, N, (x^(2*k))/(1+x^(2*k))))); Vec(h)}
C_x(50) \\ John Tyler Rascoe, May 28 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
Gus Wiseman, Oct 12 2022
EXTENSIONS
More terms from Alois P. Heinz, Oct 12 2022
STATUS
approved