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!)
A052917 Expansion of 1/(1-3*x-x^4). 3
1, 3, 9, 27, 82, 249, 756, 2295, 6967, 21150, 64206, 194913, 591706, 1796268, 5453010, 16553943, 50253535, 152556873, 463123629, 1405924830, 4268028025, 12956640948, 39333046473, 119405064249, 362483220772, 1100406303264 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,2

COMMENTS

a(n) equals the number of n-length words on {0,1,2,3} such that 0 appears only in a run whose length is a multiple of 4. - Milan Janjic, Feb 17 2015

LINKS

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

INRIA Algorithms Project, Encyclopedia of Combinatorial Structures 900

Milan Janjic, Binomial Coefficients and Enumeration of Restricted Words, Journal of Integer Sequences, 2016, Vol 19, #16.7.3

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

FORMULA

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

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

a(n) = Sum_{alpha=RootOf(-1 + 3*z + z^4)} (1/2443)*(729 + 64*alpha + 144*alpha^2 + 324*alpha^3)*alpha^(-1-n).

MAPLE

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

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

MATHEMATICA

CoefficientList[Series[1/(1-3x-x^4), {x, 0, 30}], x] (* Vincenzo Librandi, Feb 20 2015 *)

RecurrenceTable[{a[0]==1, a[1]==3, a[2]==9, a[3]==27, a[n]==3a[n-1] +a[n -4]}, a[n], {n, 0, 30}] (* Bruno Berselli, Feb 20 2015 *)

PROG

(PARI) Vec(1/(1-3*x-x^4) + O(x^30)) \\ Michel Marcus, Feb 17 2015

(MAGMA) [n le 4 select 3^(n-1) else 3*Self(n-1)+Self(n-4): n in [1..30]]; // Vincenzo Librandi, Feb 20 2015

(Sage)

def A052917_list(prec):

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

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

A052917_list(30) # G. C. Greubel, Oct 16 2019

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

(MAGMA) R<x>:=PowerSeriesRing(Integers(), 27); Coefficients(R!( 1/(1-3*x-x^4) )); // Marius A. Burtea, Oct 16 2019

CROSSREFS

Sequence in context: A273898 A078226 A083591 * A099786 A237272 A192909

Adjacent sequences:  A052914 A052915 A052916 * A052918 A052919 A052920

KEYWORD

nonn,easy

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 February 22 09:22 EST 2020. Contains 332133 sequences. (Running on oeis4.)