OFFSET
0,1
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..10000
Index entries for linear recurrences with constant coefficients, signature (1, 2, -2, -1, 1).
FORMULA
First differences: a(n+1) - a(n) = A059029(n+1).
G.f.: (1+2*x)(2 - x + x^3)/((1-x)^3*(1+x)^2). - R. J. Mathar, Oct 15 2008
a(n) = 19/8 + 5*n/4 + 3*n^2/4 - (-1)^n*(n/4 + 3/8). - R. J. Mathar, Oct 15 2008
From Harvey P. Dale, Aug 26 2013: (Start)
a(n) = a(n-1) + 2*a(n-2) - 2*a(n-3) - a(n-4) + a(n-5); a(0)=2, a(1)=5, a(2)=7, a(3)=14, a(4)=18. (End)
EXAMPLE
MATHEMATICA
CoefficientList[Series[(1+2x)(2-x+x^3)/((1-x)^3(1+x)^2), {x, 0, 60}], x] (* or *) LinearRecurrence[{1, 2, -2, -1, 1}, {2, 5, 7, 14, 18}, 60] (* Harvey P. Dale, Aug 26 2013 *)
PROG
(Magma) [19/8 +5*n/4 +3*n^2/4 -(-1)^n*(n/4+3/8): n in [0..60]]; // Vincenzo Librandi, Aug 10 2011
CROSSREFS
KEYWORD
nonn,less
AUTHOR
Paul Curtz, Aug 27 2008
EXTENSIONS
Edited and extended by R. J. Mathar, Oct 15 2008
STATUS
approved