OFFSET
0,2
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..1000
J. L. Simons, Conditional recurring sequences, Doctor's Thesis, Delft University of Technology, Delft, 1976 (MR 54 #7361).
Index entries for linear recurrences with constant coefficients, signature (0,3,0,1).
FORMULA
G.f.: (1+3*x+3*x^2)/(1-3*x^2-x^4).
MATHEMATICA
CoefficientList[Series[(1 + 3 x + 3 x^2) / (1 - 3 x^2 - x^4), {x, 0, 40}], x] (* Vincenzo Librandi, Sep 10 2013 *)
LinearRecurrence[{0, 3, 0, 1}, {1, 3, 6, 9}, 40] (* Harvey P. Dale, Jul 19 2015 *)
PROG
(PARI) lista(nn) = {x = xx + xx*O(xx^nn); expr = (1 + 3*x + 3*x^2)/(1 - 3*x^2 - x^4); for (i = 0, nn, print1(polcoeff(expr, i, xx), ", "); ); } \\ Michel Marcus, Sep 09 2013
(PARI) Vec( (1+3*x+3*x^2)/(1-3*x^2-x^4)+O(x^66) ) \\ Joerg Arndt, Sep 09 2013
(Magma) m:=40; R<x>:=PowerSeriesRing(Integers(), m); Coefficients(R!(1+3*x+3*x^2)/(1-3*x^2-x^4)); // Vincenzo Librandi, Sep 10 2013
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
H. J. J. te Riele (Herman.te.Riele(AT)cwi.nl)
EXTENSIONS
More terms from Michel Marcus, Sep 09 2013
STATUS
approved