OFFSET
0,2
COMMENTS
Conjecture: a(n) is the number of integer compositions of n + 2 in which the even parts appear as often at even positions as at odd positions (confirmed up to n = 19). - Gus Wiseman, Mar 17 2018
LINKS
Michael De Vlieger, Table of n, a(n) for n = 0..3326
Christian Krattenthaler, Daniel Yaqubi, Some determinants of path generating functions, II, arXiv:1802.05990 [math.CO], 2018; Adv. Appl. Math. 101 (2018), 232-265.
FORMULA
a(2*n) = ((3*n + 1)/(2*n + 1))*C(2*n + 1, n)= A051924(1+n), n>=0, a(2*n-1) = a(2*n)/2 = A097613(1+n), n >= 1. - Herbert Kociemba, May 08 2004
a(n) = Sum_{k=0..n} binomial(floor((n+k)/2), floor(k/2)). - Paul Barry, Jul 15 2004
Inverse binomial transform of A005774: (1, 3, 9, 26, 75, 216, ...). - Gary W. Adamson, Oct 22 2007
Conjecture: (n+3)*a(n) - 2*a(n-1) + (-5*n-3)*a(n-2) + 2*a(n-3) + 4*(n-3)*a(n-4) = 0. - R. J. Mathar, Jun 20 2013
a(n) = (1/2)^((5 - (-1)^n)/2)*(6*n + 7 - 3*(-1)^n)*Catalan((2*n + 1 - (-1)^n)/4), where Catalan is the Catalan number = A000108. - G. C. Greubel, Nov 08 2018
EXAMPLE
The a(3) = 7 compositions of 5 in which the even parts appear as often at even positions as at odd positions are (5), (311), (131), (113), (221), (122), (11111). Missing are (41), (14), (32), (23), (212), (2111), (1211), (1121), (1112). - Gus Wiseman, Mar 17 2018
MATHEMATICA
Array[Sum[Binomial[Floor[(# + k)/2], Floor[k/2]], {k, 0, #}] &, 34, 0] (* Michael De Vlieger, May 16 2018 *)
Table[2^(-1 + n)*(((2 + 3*#)*Gamma[(1 + #)/2])/(Sqrt[Pi]*Gamma[2 + #/2]) &[n + Mod[n, 2]]), {n, 0, 40}] (* Peter Pein, Nov 08 2018 *)
Table[(1/2)^((5 - (-1)^n)/2)*(6*n + 7 - 3*(-1)^n)*CatalanNumber[(2*n + 1 - (-1)^n)/4], {n, 0, 40}] (* G. C. Greubel, Nov 08 2018 *)
PROG
(PARI) vector(40, n, n--; sum(k=0, n, binomial(floor((n+k)/2), floor(k/2)))) \\ G. C. Greubel, Nov 08 2018
(Magma) [(&+[Binomial(Floor((n+k)/2), Floor(k/2)): k in [0..n]]): n in [0..40]]; // G. C. Greubel, Nov 08 2018
CROSSREFS
KEYWORD
nonn
AUTHOR
STATUS
approved