OFFSET
0,3
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (1,0,1,-1).
FORMULA
G.f.: (1+2*x^2+x^3)/((1-x)^2*(1+x+x^2)).
a(n) = A168057(n)/2^n.
a(n) = (12*n+3+6*cos(2*n*Pi/3)-2*sqrt(3)*sin(2*n*Pi/3))/9. - Wesley Ivan Hurt, Sep 30 2017
MATHEMATICA
LinearRecurrence[{1, 0, 1, -1}, {1, 1, 3, 5}, 100] (* G. C. Greubel, Jul 07 2016 *)
CoefficientList[Series[(1 + 2 x^2 + x^3) / ((1 - x)^2 (1 + x + x^2)), {x, 0, 80}], x] (* Vincenzo Librandi, Jul 08 2016 *)
PROG
(Magma) I:=[1, 1, 3, 5]; [n le 4 select I[n] else Self(n-1)+Self(n-3)-Self(n-4): n in [1..70]]; // Vincenzo Librandi, Jul 08 2016
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Paul Barry, Nov 17 2009
STATUS
approved