OFFSET
0,3
COMMENTS
Partial sums of A077925 (signed Jacobsthal numbers). - Paul Barry, Aug 26 2003
The generalized (3,-2)-Padovan sequence p(3,-2;n). See the W. Lang link under A000931 with (A,B)=(3,-2). - Wolfdieter Lang, Jun 28 2010
LINKS
Colin Barker, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (0,3,-2).
FORMULA
G.f.: (1-x)^(-1)/(1+x-2*x^2).
a(n) = Sum_{k=0..n} Sum_{j=0..k} Sum_{i=0..j} binomial(j, i)*(-3)^i. - Paul Barry, Aug 26 2003
a(n) = (-1)^n * A053088(n). - R. J. Mathar, Aug 30 2008
From Colin Barker, Apr 21 2016: (Start)
a(n) = 3*a(n-2) - 2*a(n-3) for n>2.
a(n) = (5+(-1)^n*2^(2+n)+3*n)/9. (End)
E.g.f.: (4*exp(-2*x) + (5 + 3*x)*exp(x))/9. - Ilya Gutkovskiy, Apr 21 2016
a(n) = Sum_{k=0..n} (n+1-k)*(-2)^k. - Bruno Berselli, May 15 2018
EXAMPLE
(3,-2)-Padovan combinatorics from the (3,2)-Morse code with weights -2 and 3 for 3-lines -- and 2-lines -, respectively (see the W. Lang link under A000931). n=5: two codes - -- and -- - with the weights (3^1)*(-2)^1 and (-2)^1*3^1, respectively, adding up to 2*(3)(-2) = -12 = a(5). - Wolfdieter Lang, Jun 28 2010
MAPLE
MATHEMATICA
CoefficientList[Series[(1 - x)^(-1)/(1 + x - 2*x^2), {x, 0, 40}], x] (* Wesley Ivan Hurt, Apr 21 2016 *)
PROG
(PARI) Vec(1/(1-x)/(1+x-2*x^2)+O(x^99)) \\ Charles R Greathouse IV, Sep 26 2012
(Magma) [(5+(-1)^n*2^(2+n)+3*n)/9 : n in [0..50]]; // Wesley Ivan Hurt, Apr 21 2016
CROSSREFS
KEYWORD
sign,easy
AUTHOR
N. J. A. Sloane, Nov 17 2002
STATUS
approved