%I #28 Sep 08 2022 08:45:07
%S 1,0,3,-2,9,-12,31,-54,117,-224,459,-906,1825,-3636,7287,-14558,29133,
%T -58248,116515,-233010,466041,-932060,1864143,-3728262,7456549,
%U -14913072,29826171,-59652314,119304657,-238609284,477218599,-954437166,1908874365,-3817748696,7635497427
%N Expansion of (1 - x)^(-1)/(1 + x - 2*x^2).
%C Partial sums of A077925 (signed Jacobsthal numbers). - _Paul Barry_, Aug 26 2003
%C 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
%H Colin Barker, <a href="/A077898/b077898.txt">Table of n, a(n) for n = 0..1000</a>
%H <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (0,3,-2).
%F G.f.: (1-x)^(-1)/(1+x-2*x^2).
%F a(n) = Sum_{k=0..n} Sum_{j=0..k} Sum_{i=0..j} binomial(j, i)*(-3)^i. - _Paul Barry_, Aug 26 2003
%F a(n) = (-1)^n * A053088(n). - _R. J. Mathar_, Aug 30 2008
%F From _Colin Barker_, Apr 21 2016: (Start)
%F a(n) = 3*a(n-2) - 2*a(n-3) for n>2.
%F a(n) = (5+(-1)^n*2^(2+n)+3*n)/9. (End)
%F E.g.f.: (4*exp(-2*x) + (5 + 3*x)*exp(x))/9. - _Ilya Gutkovskiy_, Apr 21 2016
%F a(n) = Sum_{k=0..n} (n+1-k)*(-2)^k. - _Bruno Berselli_, May 15 2018
%e (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
%p A077898:=n->(5+(-1)^n*2^(2+n)+3*n)/9: seq(A077898(n), n=0..50); # _Wesley Ivan Hurt_, Apr 21 2016
%t CoefficientList[Series[(1 - x)^(-1)/(1 + x - 2*x^2), {x, 0, 40}], x] (* _Wesley Ivan Hurt_, Apr 21 2016 *)
%o (PARI) Vec(1/(1-x)/(1+x-2*x^2)+O(x^99)) \\ _Charles R Greathouse IV_, Sep 26 2012
%o (Magma) [(5+(-1)^n*2^(2+n)+3*n)/9 : n in [0..50]]; // _Wesley Ivan Hurt_, Apr 21 2016
%Y Cf. A000931, A053088, A077925.
%K sign,easy
%O 0,3
%A _N. J. A. Sloane_, Nov 17 2002