OFFSET
0,3
COMMENTS
At one time this was given as the g.f. for A004657. In fact it produces a different sequence, showm here.
LINKS
Colin Barker, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (2,0,-2,1).
FORMULA
The g.f. can also be written as (1+x^2+x^4)*(1+x^4)/((1-x)*(1-x^2)*(1-x^3)). - N. J. A. Sloane, Nov 07 2017
From Colin Barker, Apr 14 2016: (Start)
a(n) = (13+3*(-1)^n-4*n+2*n^2)/4 for n>2.
a(n) = (n^2-2*n+8)/2 for n>2 and even.
a(n) = (n^2-2*n+5)/2 for n>2 and odd.
a(n) = a(n-1)+a(n-2)-a(n-4)-a(n-5)+a(n-6) for n>6.
(End)
MATHEMATICA
CoefficientList[Series[(1+x^2+x^4)(1+x^4)/((1-x)(1-x^2)(1-x^3)), {x, 0, 60}], x] (* or *) LinearRecurrence[{2, 0, -2, 1}, {1, 1, 3, 4, 8, 10, 16}, 60] (* Harvey P. Dale, Nov 07 2017 *)
PROG
(PARI) Vec((1+x^2+x^4)*(1+x^4)/((1-x)*(1-x^2)*(1-x^3)) + O(x^50)) \\ Colin Barker, Apr 14 2016
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
N. J. A. Sloane, Apr 08 2004
EXTENSIONS
Definition simplified by N. J. A. Sloane, Nov 07 2017
STATUS
approved