OFFSET
0,3
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
FORMULA
a(n) = 2*( (49*n^2 - 287*n + 360)*a(n-1) + 2*(n-3)*(7*n-8)*(7*n-17)*a(n-2) )/((n+1)*(7*n-24)*(7*n-15)) for n > 2. - G. C. Greubel, Jun 13 2024
MATHEMATICA
T[n_, k_]:= T[n, k]= If[k==0 || k==n, 1, If[k==1 || k==n-1, 2*n-1, T[n -1, k-1] +T[n-1, k]]]; (* T = A026615 *)
Table[T[n, Floor[n/2]], {n, 0, 40}] (* G. C. Greubel, Jun 13 2024 *)
PROG
(Magma)
I:=[1, 3]; [1] cat [n le 2 select I[n] else 2*((49*n^2-287*n+360 )*Self(n-1) + 2*(n-3)*(7*n-8)*(7*n-17)*Self(n-2) )/((n+1)*(7*n-24)*(7*n-15)) : n in [1..40]]; // G. C. Greubel, Jun 13 2024
(SageMath)
@CachedFunction
def T(n, k): # T = A026615
if k==0 or k==n: return 1
elif k==1 or k==n-1: return 2*n-1
else: return T(n-1, k-1) + T(n-1, k)
def A026621(n): return T(n, int(n//2))
[A026621(n) for n in range(41)] # G. C. Greubel, Jun 13 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
STATUS
approved