login
A026752
a(n) = T(2n-1,n-2), T given by A026747.
10
1, 7, 39, 201, 1000, 4885, 23621, 113543, 543895, 2600204, 12417829, 59278440, 282969385, 1351124510, 6454283276, 30849969965, 147555219782, 706274470775, 3383203356648, 16219148141581, 77817618006364, 373661751926702
OFFSET
2,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-1, n-2), n=2..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-1, n-2], {n, 2, 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-1, n-2) for n in (2..30)] # G. C. Greubel, Oct 29 2019
KEYWORD
nonn
STATUS
approved