OFFSET
1,4
COMMENTS
The first differences are 0, 0, -2, 2, -1, -1, 4, -1, -1, 6, -1, -1, 8, -1, -1, 10, ... .
LINKS
Colin Barker, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (1,0,2,-2,0,-1,1).
FORMULA
From Colin Barker, Jan 12 2016: (Start)
a(n) = a(n-1)+2*a(n-3)-2*a(n-4)-a(n-6)+a(n-7) for n>7.
G.f.: -x^4*(1+x^2)*(2-2*x-x^2-x^3+x^4) / ((1-x)^3*(1+x+x^2)^2).
(End)
PROG
(Magma) &cat[IsZero(k) select [0, 0, 0] else [k*(k-3), k*(k-1), k*(k-1)-1]: k in [0..30]]; // Bruno Berselli, Sep 16 2013
(PARI) concat(vector(3), Vec(-x^4*(1+x^2)*(2-2*x-x^2-x^3+x^4)/((1-x)^3*(1+x+x^2)^2) + O(x^100))) \\ Colin Barker, Jan 12 2016
CROSSREFS
KEYWORD
sign,easy
AUTHOR
Ralf Stephan, Sep 16 2013
STATUS
approved