OFFSET
1,4
COMMENTS
See A124593 for definition.
LINKS
Colin Barker, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (1,2,-2,-1,1).
FORMULA
G.f.: x/((1-x)*(1-x^2)^2) + 1 - x^3 + 3*x^4 + 15*x^5 + x^6.
From Colin Barker, May 27 2016: (Start)
a(n) = (-1+(-1)^n+2*(1+(-1)^n)*n+2*n^2)/16 for n>7.
a(n) = (n^2+2*n)/8 for n>7 and even.
a(n) = (n^2-1)/8 for n>7 and odd.
a(n) = a(n-1)+2*a(n-2)-2*a(n-3)-a(n-4)+a(n-5) for n>12.
G.f.: x*(1-2*x^2+x^3+5*x^4+13*x^5-22*x^6-26*x^7+32*x^8+14*x^9-14*x^10-x^11) / ((1-x)^3*(1+x)^2).
(End)
MATHEMATICA
LinearRecurrence[{1, 2, -2, -1, 1}, {1, 1, 1, 2, 6, 21, 7, 10, 10, 15, 15, 21, 21}, 70] (* Harvey P. Dale, Sep 18 2019 *)
PROG
(PARI) Vec(x*(1-2*x^2+x^3+5*x^4+13*x^5-22*x^6-26*x^7+32*x^8+14*x^9-14*x^10-x^11) / ((1-x)^3*(1+x)^2) + O(x^50)) \\ Colin Barker, May 27 2016
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
David Applegate and N. J. A. Sloane, Mar 05 2007
STATUS
approved