login
A026645
a(n) = Sum_{k=0..floor(n/2)} A026637(n, k).
7
1, 1, 3, 5, 14, 21, 55, 85, 216, 341, 848, 1365, 3340, 5461, 13191, 21845, 52208, 87381, 206968, 349525, 821514, 1398101, 3264044, 5592405, 12979006, 22369621, 51642594, 89478485, 205592744, 357913941, 818848135, 1431655765, 3262611696, 5726623061, 13003800704, 22906492245
OFFSET
0,3
LINKS
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
KEYWORD
nonn
STATUS
approved