OFFSET
1,2
LINKS
Colin Barker, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (2,0,-2,1).
FORMULA
a(n) = 2*a(n-1) - 2*a(n-3) + a(n-4).
a(n) = 1 + 2*(n-1)^2 + floor((n-1)^2/2). - Wesley Ivan Hurt, Jun 14 2013
G.f.: x*(1 + x + 5*x^2 + 3*x^3) / ((1 - x)^3*(1 + x)). - Colin Barker, Jun 08 2020
MATHEMATICA
LinearRecurrence[{2, 0, -2, 1}, {1, 3, 11, 23}, 50] (* Harvey P. Dale, Oct 17 2020 *)
PROG
(PARI) a(n) = 5*n^2/2 - 5*n + 13/4 - (-1)^n/4; \\ Jinyuan Wang, Jun 07 2020
(PARI) Vec(x*(1 + x + 5*x^2 + 3*x^3) / ((1 - x)^3*(1 + x)) + O(x^40)) \\ Colin Barker, Jun 08 2020
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Roger L. Bagula, Sep 07 2006
EXTENSIONS
Definition replaced by polynomial - The Assoc. Editors of the OEIS, Oct 14 2009
STATUS
approved