login
A026632
a(n) = A026626(n, floor(n/2)).
16
1, 1, 3, 4, 8, 14, 28, 49, 98, 177, 354, 650, 1300, 2417, 4834, 9071, 18142, 34289, 68578, 130360, 260720, 497928, 995856, 1909322, 3818644, 7345470, 14690940, 28338826, 56677652, 109597727, 219195454, 424761659, 849523318
OFFSET
0,3
LINKS
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
KEYWORD
nonn
STATUS
approved