OFFSET
0,3
REFERENCES
S. Heubach and T. Mansour, Combinatorics of Compositions and Words, CRC Press, 2010.
LINKS
V. E. Hoggatt, Jr., and Marjorie Bicknell, Palindromic compositions, Fibonacci Quart., Vol. 13(4), 1975, pp. 350-356.
Index entries for linear recurrences with constant coefficients, signature (0,1,0,2,0,-1).
FORMULA
G.f.: g(z) =(1+z^2 )*(1+z-z^3)/(1-z^2-2z^4+z^6). In the more general situation of compositions into a[1]<a[2]<a[3]<..., denoting F(z) = Sum(z^{a[j]},j>=1}, we have g(z)=(1+F(z))/(1-F(z^2)) (see Theorem 1.2 in the Hoggatt et al. reference).
EXAMPLE
a(6) = 7 because the palindromic compositions of 6 with parts in {1,2,4,6,8,...} are 6, 141, 222, 2112, 1221, 11211, and 111111.
MAPLE
g := (1+z^2)*(1+z-z^3)/(1-z^2-2*z^4+z^6): gser:= series(g, z=0, 55): seq(coeff(gser, z, n), n=0..50);
MATHEMATICA
CoefficientList[Series[(1 + x^2) (1 + x - x^3)/(1 - x^2 - 2 x^4 + x^6), {x, 0, 50}], x] (* Vincenzo Librandi, Aug 18 2016 *)
LinearRecurrence[{0, 1, 0, 2, 0, -1}, {1, 1, 2, 1, 4, 2}, 50] (* Harvey P. Dale, Jul 03 2021 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Emeric Deutsch, Aug 17 2016
STATUS
approved