OFFSET
1,2
COMMENTS
Also Schröder paths of length n having floor(n/2) peaks. - Peter Luschny, Sep 30 2018
LINKS
R. H. Hardin, Table of n, a(n) for n = 1..210
FORMULA
f3 = floor((n+1)/2); f4 = floor(n/2);
a(n) = (n - f + 1)*(2*n - f)! / ((n - f + 1)!^2 * f!) where f = floor(n/2). - Peter Luschny, Sep 30 2018
EXAMPLE
Some solutions for n=5:
0 x 4 0 x 5 1 x 3 0 x 1 0 x 3 1 x 4 0 x 2
x 3 x x 1 x x 0 x x 4 x x 2 x x 0 x x 1 x
1 x 5 2 x 6 2 x 5 2 x 3 1 x 6 2 x 5 3 x 5
x 7 x x 3 x x 6 x x 6 x x 5 x x 6 x x 6 x
2 x 6 4 x 7 4 x 7 5 x 7 4 x 7 3 x 7 4 x 7
MAPLE
T := (n, k) -> (n-k+1)*(2*n-k)!/((n-k+1)!^2*k!):
a := n -> T(n, floor(n/2)): seq(a(n), n = 1..23); # Peter Luschny, Sep 30 2018
MATHEMATICA
Table[(n - Floor[n/2] + 1) (2 n - Floor[n/2])! / ((n -Floor[n/2] + 1)!^2 Floor[n/2]!), {n, 1, 30}] (* Vincenzo Librandi, Oct 01 2018 *)
PROG
(Magma) [(n-(n div 2)+1)*Factorial(2*n-(n div 2)) / (Factorial(n-(n div 2) +1)^2*Factorial((n div 2))): n in [1..30]]; // Vincenzo Librandi, Oct 01 2018
CROSSREFS
KEYWORD
nonn
AUTHOR
R. H. Hardin, Aug 07 2012
STATUS
approved