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!)
A052949 Expansion of (2-4*x+x^3)/((1-x)*(1-2*x-x^2+x^3)). 2
2, 2, 4, 7, 15, 32, 71, 158, 354, 794, 1783, 4005, 8998, 20217, 45426, 102070, 229348, 515339, 1157955, 2601900, 5846415, 13136774, 29518062, 66326482, 149034251, 334876921, 752461610, 1690765889, 3799116466, 8536537210, 19181424996 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,1

LINKS

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

INRIA Algorithms Project, Encyclopedia of Combinatorial Structures 1008

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

FORMULA

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

a(n) = 2*a(n-1) + a(n-2) - a(n-3) - 1.

a(n) = A006356(n-1) + 1, n>0.

a(n) = 1 + Sum_{alpha=RootOf(1-2*z-z^2+z^3)} (1/7)*(1 + 2*alpha - alpha^2)*alpha^(-1-n).

MAPLE

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

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

MATHEMATICA

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

PROG

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

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

(Sage)

def A052949_list(prec):

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

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

A052949_list(40) # G. C. Greubel, Oct 21 2019

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

CROSSREFS

Cf. A006356.

Sequence in context: A049906 A014265 A153967 * A014266 A032441 A238184

Adjacent sequences:  A052946 A052947 A052948 * A052950 A052951 A052952

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 December 5 17:42 EST 2019. Contains 329768 sequences. (Running on oeis4.)