OFFSET
0,2
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
FORMULA
a(n+4) = ((16*n^3 + 100*n^2 + 188*n + 105)*a(n+3) - (8*n^3 + 36*n^2 + 46*n + 5)*a(n+2) + (4*n^2 + 16*n + 25)*a(n+1) - (n-1)*(2*n+5)^2*a(n))/((n+4)*(2*n+3)^2). - G. C. Greubel, Oct 30 2022
MATHEMATICA
A[n_, k_]:= Sum[(-1)^j*(n+k-3*j)!/(j!*(n-2*j)!*(k-2*j)!), {j, 0, Floor[(n+k)/3]}] - Sum[(-1)^j*(n+k-3*j-2)!/(j!*(n-2*j-1)!*(k-2*j-1)!), {j, 0, Floor[(n+k-2)/3]}];
T[n_, k_]:= A[n-k, k];
Table[T[2*n+1, n], {n, 0, 50}] (* G. C. Greubel, Oct 30 2022 *)
PROG
(Magma)
F:=Factorial;
p:= func< n, k | (&+[ (-1)^j*F(n+k-3*j)/(F(j)*F(n-2*j)*F(k-2*j)): j in [0..Min(Floor(n/2), Floor(k/2))]]) >;
q:= func< n, k | n eq 0 or k eq 0 select 0 else (&+[ (-1)^j*F(n+k-3*j-2)/(F(j)*F(n-2*j-1)*F(k-2*j-1)) : j in [0..Min(Floor((n-1)/2), Floor((k-1)/2))]]) >;
A:= func< n, k | p(n, k) - q(n, k) >;
[A(n+1, n): n in [0..50]]; // G. C. Greubel, Oct 30 2022
(SageMath)
f=factorial
def p(n, k): return sum( (-1)^j*f(n+k-3*j)/(f(j)*f(n-2*j)*f(k-2*j)) for j in range(1+min((n//2), (k//2))) )
def q(n, k): return sum( (-1)^j*f(n+k-3*j-2)/(f(j)*f(n-2*j-1)*f(k-2*j-1)) for j in range(1+min(((n-1)//2), ((k-1)//2))) )
def A(n, k): return p(n, k) - q(n, k)
[A(n+1, n) for n in range(51)] # G. C. Greubel, Oct 30 2022
CROSSREFS
KEYWORD
nonn
AUTHOR
EXTENSIONS
Corrected and extended by Sean A. Irvine, May 11 2021
STATUS
approved