A077889 Expansion of 1/( (1-x)*(1 + x^2 + x^3) ).
1, 1, 0, -1, 0, 2, 2, -1, -3, 0, 5, 4, -4, -8, 1, 13, 8, -13, -20, 6, 34, 15, -39, -48, 25, 88, 24, -112, -111, 89, 224, 23, -312, -246, 290, 559, -43, -848, -515, 892, 1364, -376, -2255, -987, 2632, 3243, -1644, -5874, -1598, 7519, 7473, -5920, -14991, -1552, 20912, 16544, -19359, -37455, 2816, 56815
Offset: 0
Links
- Michael De Vlieger, Table of n, a(n) for n = 0..10000
- Eunmi Choi, Yuna Oh, Diagonal sums in negative trinomial table, Korean J. Math (2019) Vol. 27, No. 3, 723-734.
- Index entries for linear recurrences with constant coefficients, signature (1,-1,0,1).
Programs
-
GAP
a:=[1,1,0,-1];; for n in [5..60] do a[n]:=a[n-1]-a[n-2]+a[n-4]; od; a; # G. C. Greubel, Dec 30 2019
-
Magma
R
:=PowerSeriesRing(Integers(), 60); Coefficients(R!( 1/((1-x)*(1+x^2+x^3)) )); // G. C. Greubel, Dec 30 2019 -
Maple
A101950 := proc(n,k) local j,k1: add((-1)^((n-j)/2)*binomial((n+j)/2,j)*(1+(-1)^(n+j))* binomial(j,k)/2, j=0..n) end: A077889 := proc(n): add(A101950(n-3*k,k), k=0..floor(n/4)) end: seq(A077889(n), n=0..60); # Johannes W. Meijer, Aug 06 2011
-
Mathematica
CoefficientList[Series[1/((1-x)*(1+x^2+x^3)),{x,0,60}],x] (* or *) LinearRecurrence[{1,-1,0,1},{1,1,0,-1},60] (* Harvey P. Dale, Jul 14 2017 *)
-
PARI
my(x='x+O('x^60)); Vec(1/((1-x)*(1+x^2+x^3))) \\ G. C. Greubel, Dec 30 2019
-
Sage
def A077952_list(prec): P.
= PowerSeriesRing(ZZ, prec) return P( 1/((1-x)*(1+x^2+x^3)) ).list() A077952_list(60) # G. C. Greubel, Dec 30 2019
Formula
a(n) = Sum_{k=0..floor(n/4)} A101950(n-3*k, k).
a(n)-a(n-1) = A077962(n). - R. J. Mathar, Mar 14 2021
Comments