login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

A026749
a(n) = T(2n,n-1), T given by A026747.
11
1, 6, 30, 143, 671, 3132, 14601, 68101, 318035, 1487661, 6971222, 32727472, 153926409, 725264305, 3423262180, 16185240446, 76648901377, 363557014067, 1726994886004, 8215502584008, 39135887682617, 186676023857041, 891557875400175
OFFSET
1,2
LINKS
MAPLE
A026747 := proc(n, k) option remember;
if k=0 or k = n then 1;
elif type(n, 'even') and k <= n/2 then
procname(n-1, k-1)+procname(n-2, k-1)+procname(n-1, k) ;
else
procname(n-1, k-1)+procname(n-1, k) ;
end if ;
end proc:
seq(A026747(2*n, n-1), n=1..30); # G. C. Greubel, Oct 29 2019
MATHEMATICA
T[n_, k_]:= T[n, k]= If[k==0 || k==n, 1, If[EvenQ[n] && k<=n/2, T[n-1, k -1] + T[n-2, k-1] + T[n-1, k], T[n-1, k-1] + T[n-1, k] ]]; Table[T[2n, n-1], {n, 30}] (* G. C. Greubel, Oct 29 2019 *)
PROG
(Sage)
@CachedFunction
def T(n, k):
if (k==0 or k==n): return 1
elif (mod(n, 2)==0 and k<=n/2): return T(n-1, k-1) + T(n-2, k-1) + T(n-1, k)
else: return T(n-1, k-1) + T(n-1, k)
[T(2*n, n-1) for n in (1..30)] # G. C. Greubel, Oct 29 2019
KEYWORD
nonn
STATUS
approved