A290996 p-INVERT of (1,1,1,1,1,...), where p(S) = 1 - S - S^4.
1, 2, 4, 9, 22, 55, 136, 330, 789, 1872, 4433, 10510, 24968, 59409, 141470, 336935, 802340, 1910166, 4546845, 10822176, 25758097, 61308650, 145928764, 347350473, 826795942, 1968018151, 4684451824, 11150316882, 26540849109, 63174538224, 150372815489
Offset: 0
Links
- Clark Kimberling, Table of n, a(n) for n = 0..1000
- Index entries for linear recurrences with constant coefficients, signature (5,-9,7,-1).
Programs
-
Magma
I:=[1,2,4,9]; [n le 4 select I[n] else 5*Self(n-1) -9*Self(n-2) +7*Self(n-3) -Self(n-4): n in [1..51]]; // G. C. Greubel, Apr 13 2023
-
Mathematica
z = 60; s = x/(1-x); p = 1 -s -s^4; Drop[CoefficientList[Series[s, {x,0,z}], x], 1] (* A000012 *) Drop[CoefficientList[Series[1/p, {x,0,z}], x], 1] (* A290996 *) LinearRecurrence[{5,-9,7,-1}, {1,2,4,9}, 60] (* G. C. Greubel, Apr 13 2023 *)
-
PARI
Vec((1 - 3*x + 3*x^2) / (1 - 5*x + 9*x^2 - 7*x^3 + x^4) + O(x^50)) \\ Colin Barker, Aug 22 2017
-
SageMath
@CachedFunction def a(n): # a = A290996 if(n<4): return (1,2,4,9)[n] else: return 5*a(n-1) - 9*a(n-2) + 7*a(n-3) - a(n-4) [a(n) for n in range(61)] # G. C. Greubel, Apr 13 2023
Formula
a(n) = 5*a(n-1) - 9*a(n-2) + 7*a(n-3) - a(n-4) for n >= 4.
G.f.: (1 - 3*x + 3*x^2) / (1 - 5*x + 9*x^2 - 7*x^3 + x^4). - Colin Barker, Aug 22 2017
Comments