login
A144413
a(n) = Sum_{k=0..n} (-1)^k * binomial(n, k) * A000931(n-k+4).
1
0, 1, -1, 1, 0, -3, 10, -24, 49, -89, 145, -208, 245, -174, -176, 1121, -3185, 7137, -13920, 24301, -37926, 51256, -53615, 20407, 97265, -386224, 984549, -2083934, 3896480, -6537023, 9734175, -12231999, 10690624, 2126301, -39992150, 126414472, -297132815, 598577351, -1075051951, 1730868336, -2443923755
OFFSET
0,6
FORMULA
From R. J. Mathar, Jan 21 2009: (Start)
a(n) = -3*a(n-1) - 2*a(n-2) + a(n-3).
G.f.: x*(1 +2*x)/(1 +3*x +2*x^2 -x^3). (End)
MATHEMATICA
(* First program *)
b[n_]:= b[n]= If[n==0, 0, If[n<3, 1, b[n-2] +b[n-3]]];
a[n_]:= Sum[(-1)^m*Binomial[n, m]*b[n-m], {m, 0, n}];
Table[a[n], {n, 0, 50}]
(* Second program *)
LinearRecurrence[{-3, -2, 1}, {0, 1, -1}, 51] (* G. C. Greubel, Mar 27 2021 *)
PROG
(Magma) I:=[0, 1, 1]; [n le 3 select I[n] else -3*Self(n-1) -2*Self(n-2) +Self(n-3): n in [1..51]]; // G. C. Greubel, Mar 27 2021
(Sage)
@CachedFunction
def A000931(n): return 1 if n==0 else sum( binomial(k, n-2*k-3) for k in (0..floor((n-3)/2)))
def A144413(n): return sum( (-1)^k*binomial(n, k)*A000931(n-k+4) for k in (0..n))
[A144413(n) for n in (0..50)] # G. C. Greubel, Mar 27 2021
CROSSREFS
KEYWORD
sign,easy
AUTHOR
EXTENSIONS
Terms a(30) onward added and edited by G. C. Greubel, Mar 27 2021
STATUS
approved