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

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A052958 Expansion of g.f.: (1-x)/(1-3*x-2*x^3+2*x^4). 1
1, 2, 6, 20, 62, 194, 610, 1914, 6006, 18850, 59158, 185658, 582662, 1828602, 5738806, 18010426, 56523158, 177389882, 556712886, 1747164122, 5483225814, 17208323450, 54005872822, 169489741850, 531919420822, 1669353361210 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,2

LINKS

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

INRIA Algorithms Project, Encyclopedia of Combinatorial Structures 1029

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

FORMULA

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

a(n) = Sum_{alpha=RootOf(1-3*z-2*z^3+2*z^4)} (1/3259)*(491 + 503*alpha + 272*alpha^2 - 498*alpha^3)*alpha^(-1-n).

MAPLE

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

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

MATHEMATICA

LinearRecurrence[{3, 0, 2, -2}, {1, 2, 6, 20}, 40] (* G. C. Greubel, Oct 22 2019 *)

PROG

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

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

(Sage)

def A052958_list(prec):

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

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

A052958_list(40) # G. C. Greubel, Oct 22 2019

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

CROSSREFS

Sequence in context: A132353 A263900 A260696 * A247076 A177792 A193235

Adjacent sequences:  A052955 A052956 A052957 * A052959 A052960 A052961

KEYWORD

easy,nonn

AUTHOR

encyclopedia(AT)pommard.inria.fr, Jan 25 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 July 13 16:22 EDT 2020. Contains 335688 sequences. (Running on oeis4.)