A159285 Expansion of (1+3*x)/(1-x^2-2*x^3).
1, 3, 1, 5, 7, 7, 17, 21, 31, 55, 73, 117, 183, 263, 417, 629, 943, 1463, 2201, 3349, 5127, 7751, 11825, 18005, 27327, 41655, 63337, 96309, 146647, 222983, 339265, 516277, 785231, 1194807, 1817785, 2765269, 4207399, 6400839, 9737937, 14815637
Offset: 0
Links
- G. C. Greubel, Table of n, a(n) for n = 0..1000
- Creighton Dement, Online Floretion Multiplier [broken link]
- Index entries for linear recurrences with constant coefficients, signature (0,1,2).
Programs
-
Magma
I:=[1,3,1]; [n le 3 select I[n] else Self(n-2) + 2*Self(n-3): n in [1..30]]; // G. C. Greubel, Jun 27 2018
-
Mathematica
LinearRecurrence[{0, 1, 2}, {1, 3, 1}, 50] (* G. C. Greubel, Jun 27 2018 *) CoefficientList[Series[(1+3x)/(1-x^2-2x^3),{x,0,40}],x] (* Harvey P. Dale, Jan 21 2019 *)
-
PARI
a(n)=([0,1,0; 0,0,1; 2,1,0]^n*[1;3;1])[1,1] \\ Charles R Greathouse IV, Oct 03 2016
Comments