login
A026525
a(n) = T(2*n, n), where T is given by A026519.
21
1, 1, 5, 16, 65, 251, 1016, 4117, 16913, 69865, 290455, 1212905, 5085224, 21389824, 90226449, 381519416, 1616684241, 6863544233, 29187402749, 124305180842, 530108333515, 2263423401745, 9674857844129, 41396075156859, 177285394355336, 759895396193376, 3259667597627576, 13992851410449865
OFFSET
0,3
LINKS
FORMULA
a(n) = A026519(2*n, n).
a(n) = A026536(2*n, n).
MATHEMATICA
T[n_, k_]:= T[n, k]= If[k<0 || k>2*n, 0, If[k==0 || k==2*n, 1, If[k==1 || k==2*n-1, Floor[(n+1)/2], If[EvenQ[n], T[n-1, k-2] + T[n-1, k], T[n-1, k-1] + T[n-1, k-2] + T[n-1, k] ]]]]; (* T = A026519 *)
a[n_] := a[n] = Block[{$RecursionLimit = Infinity}, T[2 n, n] ];
Table[a[n], {n, 0, 40}] (* G. C. Greubel, Dec 20 2021 *)
PROG
(Sage)
@CachedFunction
def T(n, k): # T = A026519
if (k<0 or k>2*n): return 0
elif (k==0 or k==2*n): return 1
elif (k==1 or k==2*n-1): return (n+1)//2
elif (n%2==0): return T(n-1, k) + T(n-1, k-2)
else: return T(n-1, k) + T(n-1, k-1) + T(n-1, k-2)
[T(2*n, n) for n in (0..40)] # G. C. Greubel, Dec 20 2021
KEYWORD
nonn
EXTENSIONS
Terms a(20) onward added by G. C. Greubel, Dec 20 2021
STATUS
approved