login
A026527
a(n) = T(2*n, n-2), where T is given by A026519.
23
1, 3, 14, 55, 231, 952, 3976, 16614, 69750, 293557, 1238952, 5240599, 22212645, 94318875, 401143304, 1708558480, 7286677479, 31113264579, 132994055090, 569048532612, 2437033824302, 10445705817063, 44807461337160, 192342179361800, 826205908069555, 3551172735996756, 15272395383833658
OFFSET
2,2
LINKS
FORMULA
a(n) = A026519(2*n, n-2).
a(n) = A026536(2*n, 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+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-2] ];
Table[a[n], {n, 2, 40}] (* G. C. Greubel, Dec 20 2021 *)
PROG
(Sage)
@CachedFunction
def T(n, k): # T = A026552
if (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-2) for n in (2..40)] # G. C. Greubel, Dec 20 2021
KEYWORD
nonn
EXTENSIONS
Terms a(20) onward added by G. C. Greubel, Dec 20 2021
STATUS
approved