login
A026748
a(n) = T(2n,n), T given by A026747.
10
1, 3, 11, 44, 184, 790, 3452, 15278, 68290, 307696, 1395696, 6367199, 29193025, 134442102, 621609060, 2884432810, 13428450520, 62703991531, 293606387095, 1378309455352, 6485734373020, 30586630485443, 144544075759391, 684395988590939
OFFSET
0,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), n=0..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], {n, 0, 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) for n in (0..30)] # G. C. Greubel, Oct 29 2019
KEYWORD
nonn
STATUS
approved