OFFSET
0,2
COMMENTS
With [0,0,0] prepended to it, this is an autosequence of the first kind. - Jean-François Alcover, Oct 21 2019
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..1000
OEIS Wiki, Autosequence
Index entries for linear recurrences with constant coefficients, signature (3,-1,-3,2).
FORMULA
G.f.: (1-x-x^2)/((1+x)(1-x)^2(1-2x)).
a(n) = 2*2^n/3+(-1)^n/12+n/2+1/4.
a(0) = 1, a(n) = floor(2*a(n-1) - n/2 + 1) for n>0. - Gerald McGarvey, Aug 31 2004
a(n+1) - 2*a(n) = -floor(n/2) = -A004526(n). - Jean-François Alcover, Oct 21 2019 [noticed by Paul Curtz in a private e-mail]
MAPLE
MATHEMATICA
CoefficientList[Series[(1-x-x^2)/((1+x)(1-x)^2(1-2x)), {x, 0, 40}], x] (* Vincenzo Librandi, Apr 05 2012 *)
LinearRecurrence[{3, -1, -3, 2}, {1, 2, 4, 7}, 40] (* Harvey P. Dale, May 28 2015 *)
PROG
(Magma) [2*2^n/3+(-1)^n/12+n/2+1/4: n in [0..40]]; // Vincenzo Librandi, Apr 05 2012
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Paul Barry, Jul 20 2003
STATUS
approved