login
This site is supported by donations to The OEIS Foundation.

 

Logo

Please make a donation to keep the OEIS running. We are now in our 55th year. In the past year we added 12000 new sequences and reached 8000 citations (which often say "discovered thanks to the OEIS"). We need to raise money to hire someone to manage submissions, which would reduce the load on our editors and speed up editing.
Other ways to donate

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A052915 Expansion of (1-x)/(1 - x - x^2 - 3*x^3 + 3*x^4). 1
1, 0, 1, 4, 2, 9, 20, 23, 64, 120, 193, 436, 797, 1452, 2978, 5513, 10456, 20547, 38608, 73984, 142865, 271032, 520025, 997700, 1902226, 3646905, 6982156, 13342639, 25558832, 48907224, 93547505, 179103308, 342695989, 655720140, 1255083538 (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 897

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

FORMULA

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

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

a(n) = Sum_{alpha=RootOf(1 - z - z^2 - 3*z^3 + 3*z^4)} (1/2857)*(142 + 885*alpha - 240*alpha^2 - 351*alpha^3)*alpha^(-1-n).

MAPLE

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

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

MATHEMATICA

LinearRecurrence[{1, 1, 3, -3}, {1, 0, 1, 4}, 40] (* G. C. Greubel, Oct 16 2019 *)

PROG

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

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

(Sage)

def A052915_list(prec):

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

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

A052915_list(40) # G. C. Greubel, Oct 16 2019

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

CROSSREFS

Sequence in context: A298567 A006172 A171631 * A130273 A016516 A247414

Adjacent sequences:  A052912 A052913 A052914 * A052916 A052917 A052918

KEYWORD

easy,nonn

AUTHOR

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

EXTENSIONS

More terms from James A. Sellers, Jun 06 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 December 5 20:41 EST 2019. Contains 329777 sequences. (Running on oeis4.)