OFFSET
0,3
COMMENTS
Partial sums of (1,-1,3,-9,27,-81,....) (with g.f. (1+2x)/(1+3x) ).
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (-2,3)
FORMULA
G.f.: (1+2*x)/((1-x)*(1+3*x)).
G.f.: 1+ x -x/Q(0), where Q(k) = 1 + 3*x^2 + (3*k+4)*x - x*(3*k+1 + 3*x)/Q(k+1); (continued fraction). - Sergei N. Gladkovskii, Oct 07 2013
MATHEMATICA
CoefficientList[Series[(1 + 2 x)/((1 - x) (1 + 3 x)), {x, 0, 50}], x] (* Vincenzo Librandi, Oct 07 2013 *)
LinearRecurrence[{-2, 3}, {1, 0}, 30] (* Harvey P. Dale, Aug 26 2024 *)
PROG
(PARI) Vec((1+2*x)/((1-x)*(1+3*x))+O(x^66)) \\ Joerg Arndt, Jul 14 2013
(Magma) I:=[1, 0]; [n le 2 select I[n] else -2*Self(n-1)+3*Self(n-2): n in [1..30]]; // Vincenzo Librandi, Oct 07 2013
CROSSREFS
KEYWORD
easy,sign
AUTHOR
Paul Barry, May 30 2003
EXTENSIONS
Removed incorrect g.f. and e.g.f., Joerg Arndt, Jul 14 2013
STATUS
approved