OFFSET
0,3
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
MATHEMATICA
T[n_, k_]:= T[n, k]= If[k==0 || k==n, 1, If[k==1 || k==n-1, Floor[(3*n- 1)/2], T[n-1, k] + T[n-1, k-1] ]];
A026645[n_]:= Sum[T[n, k], {k, 0, Floor[n/2]}];
Table[A026645[n], {n, 0, 40}] (* G. C. Greubel, Jun 29 2024 *)
PROG
(SageMath)
@CachedFunction
def T(n, k): # T = A026637
if k==0 or k==n: return 1
elif k==1 or k==n-1: return ((3*n-1)//2)
else: return T(n-1, k) + T(n-1, k-1)
def A026645(n): return sum(T(n, k) for k in range((n//2)+1))
[A026645(n) for n in range(41)] # G. C. Greubel, Jun 29 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
STATUS
approved