OFFSET
0,3
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
FORMULA
a(n) = (4*(867*n^4 -11934*n^3 +58705*n^2 -123374*n +95280)*a(n-1) +(6069*n^5 -91817*n^4 + 525005*n^3 -1404375*n^2 +1742414*n -803760 )*a(n-2) +2*(867*n^4 - 11934*n^3 +58705*n^2 -123374*n +95280)*a(n-3) + 4*(n-5)*(867*n^4 - 8534*n^3 +28921*n^2 -39246*n +17712)*a(n-4))/(2*(n+1)*(867*n^4 - 12002*n^3 +59725*n^2 -126158*n +95280)), for n >= 6, with a(0) = a(1) = 1, a(2) = 3, a(3) = 4, and a(4) = 8. - G. C. Greubel, Jun 20 2024
MATHEMATICA
T[n_, k_]:= T[n, k]= If[k==0 || k==n, 1, If[k==1 || k==n-1, (6*n-1 + (-1)^n)/4, T[n-1, k-1] +T[n-1, k]]];
Table[T[n, Floor[n/2]], {n, 0, 40}] (* G. C. Greubel, Jun 20 2024 *)
PROG
(Magma)
[1] cat [n le 4 select Fibonacci(n+2) -(1-(-1)^n)/2 else (4*(867*n^4 - 11934*n^3 +58705*n^2 -123374*n +95280)*Self(n-1) +(6069*n^5 - 91817*n^4 +525005*n^3 -1404375*n^2 +1742414*n -803760)*Self(n-2) +2*(867*n^4 -11934*n^3 +58705*n^2 -123374*n +95280)*Self(n-3) +4*(n-5)*(867*n^4 -8534*n^3 +28921*n^2 -39246*n +17712)*Self(n-4))/(2*(n+1)*(867*n^4 -12002*n^3 +59725*n^2 -126158*n +95280)): n in [1..40]]; // G. C. Greubel, Jun 20 2024
(SageMath)
@CachedFunction
def T(n, k): # T = A026626
if (k==0 or k==n): return 1
elif (k==1 or k==n-1): return int(3*n//2)
else: return T(n-1, k-1) + T(n-1, k)
[T(n, int(n//2)) for n in range(41)] # G. C. Greubel, Jun 20 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
STATUS
approved