A126354 a(n) = 6*a(n-2) - a(n-4) for n > 4, with a(1)=1, a(2)=0, a(3)=3, a(4)=2.
1, 0, 3, 2, 17, 12, 99, 70, 577, 408, 3363, 2378, 19601, 13860, 114243, 80782, 665857, 470832, 3880899, 2744210, 22619537, 15994428, 131836323, 93222358, 768398401, 543339720, 4478554083, 3166815962, 26102926097, 18457556052, 152139002499
Offset: 1
Links
- G. C. Greubel, Table of n, a(n) for n = 1..1000
- Index entries for linear recurrences with constant coefficients, signature (0,6,0,-1).
Programs
-
GAP
a:=[1, 0, 3, 2];; for n in [5..35] do a[n]:=6*a[n-2]-a[n-4]; od; a; # G. C. Greubel, Mar 16 2019
-
Magma
I:=[1, 0, 3, 2]; [n le 4 select I[n] else 6*Self(n-2)-Self(n-4): n in [1..35]]; // G. C. Greubel, Mar 16 2019
-
Mathematica
LinearRecurrence[{0,6,0,-1}, {1,0,3,2}, 35] (* G. C. Greubel, Mar 16 2019 *)
-
PARI
my(x='x+O('x^35)); Vec(x*(1+2*x)*(1-x)^2/((1-2*x-x^2)*(1+2*x-x^2))) \\ G. C. Greubel, Mar 16 2019
-
Sage
a=(x*(1+2*x)*(1-x)^2/((1-2*x-x^2)*(1+2*x-x^2))).series(x, 35).coefficients(x, sparse=False); a[1:] # G. C. Greubel, Mar 16 2019
Formula
O.g.f.: x*(2*x+1)*(-1+x)^2/((x^2-2*x-1)*(x^2+2*x-1)). - R. J. Mathar, Dec 10 2007
Comments