login
A238452
Second column of the extended Catalan triangle A189231.
2
0, 1, 2, 2, 8, 5, 30, 14, 112, 42, 420, 132, 1584, 429, 6006, 1430, 22880, 4862, 87516, 16796, 335920, 58786, 1293292, 208012, 4992288, 742900, 19315400, 2674440, 74884320, 9694845, 290845350, 35357670, 1131445440, 129644790, 4407922860, 477638700, 17194993200
OFFSET
0,3
FORMULA
Definition: a(n) = binomial(n+1, floor(n/2)+1) / (floor(n/2)+2) if n is odd, and 2*binomial(n, floor(n/2)+1) otherwise.
a(n) = A189231(n, 1).
a(n) = A238762(n+1, n-1).
a(2*n) = A162551(n).
a(2*n+1) = A000108(n+1).
a(n) = A057977(n+1) - A057977(n)*((n+1) mod 2). - Peter Luschny, Aug 07 2016
MAPLE
a := proc(n) option remember;
if n < 3 then return n fi;
if n mod 2 = 0 then return n*a(n-1) fi;
h := iquo(n, 2); n*a(n-1)/(h*(h+2)) end:
seq(a(n), n=0..36);
MATHEMATICA
t[n_, k_] /; (k > n || k < 0) = 0; t[n_, n_] = 1; t[n_, k_] := t[n, k] =
t[n - 1, k - 1] + Mod[n - k, 2] t[n - 1, k] + t[n - 1, k + 1];
a[n_] := t[n, 1];
Table[a[n], {n, 0, 36}] (* Jean-François Alcover, Jul 10 2019 *)
PROG
(Sage)
def A238452():
a = 1; n = 2
yield 0
while True:
yield a
a *= n
if is_odd(n):
a /= (n//2*(n//2+2))
n += 1
a = A238452(); [next(a) for n in range(36)]
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Peter Luschny, Mar 01 2014
STATUS
approved