A117413 Expansion of (1-x^2)/(1-2*x^2+4*x^3+x^4).
1, 0, 1, -4, 1, -12, 17, -24, 81, -104, 241, -508, 817, -1876, 3425, -6512, 13537, -24848, 49697, -97332, 185249, -368604, 710129, -1380872, 2709425, -5233656, 10232209, -19924140, 38689617, -75543460, 146843585, -285921248, 557171393, -1083673376, 2111184193, -4110111076
Offset: 0
Links
- G. C. Greubel, Table of n, a(n) for n = 0..1000
- Index entries for linear recurrences with constant coefficients, signature (0,2,-4,-1).
Crossrefs
Cf. A117411.
Programs
-
Magma
I:=[1,0,1,-4]; [n le 4 select I[n] else 2*Self(n-1) -4*Self(n-2) -Self(n-3): n in [1..41]]; // G. C. Greubel, Sep 07 2022
-
Mathematica
CoefficientList[Series[(1-x^2)/(1-2x^2+4x^3+x^4),{x,0,40}],x] (* or *) LinearRecurrence[{0,2,-4,-1},{1,0,1,-4},40] (* Harvey P. Dale, Jul 12 2017 *)
-
SageMath
@CachedFunction def a(n): # a = A117413 if(n<4): return (1, 0, 1, -4)[n] else: return 2*a(n-2) - 4*a(n-3) - a(n-4) [a(n) for n in (0..40)] # G. C. Greubel, Sep 07 2022
Formula
a(n) = 2*a(n-2) - 4*a(n-3) - a(n-4).
a(n) = Sum_{k=0..floor(n/2)} Sum_{j=0..n-2*k} C(n-k, k-j)*C(j, n-2*k)*(-4)^(n-2*k).
a(n) = (-)^n*A052992(2*n). - R. J. Mathar, Nov 22 2024
Comments