A101677 a(n) = a(n-1) - 2*a(n-2) + 2*a(n-3) - 2*a(n-4) + 2*a(n-5) - a(n-6).
1, 1, -1, -2, -2, -2, -1, -1, -3, -4, -4, -4, -3, -3, -5, -6, -6, -6, -5, -5, -7, -8, -8, -8, -7, -7, -9, -10, -10, -10, -9, -9, -11, -12, -12, -12, -11, -11, -13, -14, -14, -14, -13, -13, -15, -16, -16, -16, -15, -15, -17, -18, -18, -18, -17, -17, -19, -20, -20, -20, -19, -19, -21, -22, -22, -22, -21, -21, -23, -24, -24, -24, -23, -23, -25, -26, -26, -26, -25, -25, -27
Offset: 0
Links
- G. C. Greubel, Table of n, a(n) for n = 0..10000
- Index entries for linear recurrences with constant coefficients, signature (2,-2,2,-2,2,-1)
Programs
-
Magma
m:=100; R
:=PowerSeriesRing(Integers(), m); Coefficients(R!((1-x-x^2)/((1-x)^2*(1+x^2+x^4)))); // G. C. Greubel, Sep 07 2018 -
Mathematica
LinearRecurrence[{2, -2, 2, -2, 2, -1},{1, 1, -1, -2, -2, -2},81] (* Ray Chandler, Sep 03 2015 *) CoefficientList[Series[(1-x-x^2)/((1-x)^2(1+x^2+x^4)),{x,0,80}],x] (* Harvey P. Dale, Dec 02 2021 *)
-
PARI
x='x+O('x^100); Vec((1-x-x^2)/((1-x)^2*(1+x^2+x^4))) \\ G. C. Greubel, Sep 07 2018
Comments