login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo

Thanks to everyone who made a donation during our annual appeal!
To see the list of donors, or make a donation, see the OEIS Foundation home page.

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A052916 Expansion of (1-x)/(1 - x - 2*x^3 + x^4). 1
1, 0, 0, 2, 1, 1, 5, 5, 6, 15, 20, 27, 51, 76, 110, 185, 286, 430, 690, 1077, 1651, 2601, 4065, 6290, 9841, 15370, 23885, 37277, 58176, 90576, 141245, 220320, 343296, 535210, 834605, 1300877, 2028001, 3162001, 4929150, 7684275, 11980276 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,4

LINKS

G. C. Greubel, Table of n, a(n) for n = 0..1000

INRIA Algorithms Project, Encyclopedia of Combinatorial Structures 899

Index entries for linear recurrences with constant coefficients, signature (1,0,2,-1).

FORMULA

G.f.: (1-x)/(1 - x - 2*x^3 + x^4).

a(n) = a(n-1) + 2*a(n-3) - a(n-4), with a(0)=1, a(1)=0, a(2)=0, a(3)=2.

a(n) = Sum_{alpha=RootOf(1-z-2*z^3+z^4)} (1/643)*(-13 + 201*alpha - 38*alpha^2 - 18*alpha^3)*alpha^(-1-n).

MAPLE

spec:=[S, {S=Sequence(Prod(Z, Z, Union(Prod(Sequence(Z), Z), Z)))}, unlabeled]: seq(combstruct[count](spec, size=n), n=0..20);

seq(coeff(series((1-x)/(1-x-2*x^3+x^4), x, n+1), x, n), n = 0..50); # G. C. Greubel, Oct 16 2019

MATHEMATICA

LinearRecurrence[{1, 0, 2, -1}, {1, 0, 0, 2}, 50]  (* Harvey P. Dale, Apr 21  2011 *)

PROG

(PARI) my(x='x+O('x^50)); Vec((1-x)/(1-x-2*x^3+x^4)) \\ G. C. Greubel, Oct 16 2019

(MAGMA) R<x>:=PowerSeriesRing(Integers(), 50); Coefficients(R!( (1-x)/(1-x-2*x^3+x^4) )); // G. C. Greubel, Oct 16 2019

(Sage)

def A052916_list(prec):

    P.<x> = PowerSeriesRing(ZZ, prec)

    return P((1-x)/(1-x-2*x^3+x^4)).list()

A052916_list(50) # G. C. Greubel, Oct 16 2019

(GAP) a:=[1, 0, 0, 2];; for n in [5..50] do a[n]:=a[n-1]+2*a[n-3]-a[n-4]; od; a; # G. C. Greubel, Oct 16 2019

CROSSREFS

Sequence in context: A156045 A119687 A086856 * A326048 A156576 A293219

Adjacent sequences:  A052913 A052914 A052915 * A052917 A052918 A052919

KEYWORD

easy,nonn

AUTHOR

encyclopedia(AT)pommard.inria.fr, Jan 25 2000

EXTENSIONS

More terms from James A. Sellers, Jun 05 2000

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified January 21 11:01 EST 2020. Contains 331105 sequences. (Running on oeis4.)