OFFSET
2,2
LINKS
G. C. Greubel, Table of n, a(n) for n = 2..300
FORMULA
a(n) = A026536(2*n-1, n-2).
MATHEMATICA
T[n_, k_]:= T[n, k]= If[k==0 || k==2*n, 1, If[k==1 || k==2*n-1, Floor[n/2], If[EvenQ[n], T[n-1, k-2] +T[n-1, k-1] +T[n-1, k], T[n-1, k-2] +T[n-1, k]] ]];
Table[T[2n-1, n-2], {n, 2, 40}] (* G. C. Greubel, Apr 11 2022 *)
PROG
(SageMath)
@CachedFunction
def T(n, k): # A026536
if k < 0 or n < 0: return 0
elif k == 0 or k == 2*n: return 1
elif k == 1 or k == 2*n-1: return n//2
elif n % 2 == 1: return T(n-1, k-2) + T(n-1, k)
return T(n-1, k-2) + T(n-1, k-1) + T(n-1, k)
def A026546(n): return T(2*n-1, n-2)
[A026546(n) for n in (2..40)] # G. C. Greubel, Apr 11 2022
CROSSREFS
KEYWORD
nonn
AUTHOR
EXTENSIONS
Terms a(20) onward added by G. C. Greubel, Apr 11 2022
STATUS
approved