login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A052927
Expansion of 1/(1-4*x-x^3).
2
1, 4, 16, 65, 264, 1072, 4353, 17676, 71776, 291457, 1183504, 4805792, 19514625, 79242004, 321773808, 1306609857, 5305681432, 21544499536, 87484608001, 355244113436, 1442520953280, 5857568421121, 23785517797920, 96584592144960, 392195937000961
OFFSET
0,2
COMMENTS
A transform of A000302 under the mapping mapping g(x) -> (1/(1-x^3)) * g(x/(1-x^3)). - Paul Barry, Oct 20 2004
a(n) equals the number of n-length words on {0,1,2,3,4} such that 0 appears only in a run which length is a multiple of 3. - Milan Janjic, Feb 17 2015
LINKS
Milan Janjic, Binomial Coefficients and Enumeration of Restricted Words, Journal of Integer Sequences, 2016, Vol 19, #16.7.3.
FORMULA
G.f.: 1/(1-4*x-x^3).
a(n) = 4*a(n-1) + a(n-3), with a(0)=1, a(1)=4, a(2)=16.
a(n) = Sum_{r=RootOf(-1+4*z+z^3)} (1/283)*(64 + 9*r + 24*r^2)*r^(-1-n).
a(n) = Sum_{k=0..floor(n/3)} binomial(n-2*k, k)*4^(n-3*k). - Paul Barry, Oct 20 2004
MAPLE
spec:= [S, {S=Sequence(Union(Z, Z, Z, Z, Prod(Z, Z, Z)))}, unlabeled]: seq(combstruct[count](spec, size=n), n=0..20);
seq(coeff(series(1/(1-4*x-x^3), x, n+1), x, n), n = 0..40); # G. C. Greubel, Oct 17 2019
MATHEMATICA
CoefficientList[Series[1/(1-4x-x^3), {x, 0, 40}], x] (* or *) LinearRecurrence[{4, 0, 1}, {1, 4, 16}, 40] (* Vladimir Joseph Stephan Orlovsky, Jan 28 2012 *)
PROG
(Magma) I:=[1, 4, 16]; [n le 3 select I[n] else 4*Self(n-1)+Self(n-3): n in [1..30]]; // Vincenzo Librandi, Jun 22 2012
(Magma) R<x>:=PowerSeriesRing(Integers(), 25); Coefficients(R!( 1/(1-4*x-x^3))); // Marius A. Burtea, Oct 18 2019
(PARI) my(x='x+O('x^30)); Vec(1/(1-4*x-x^3)) \\ G. C. Greubel, Oct 17 2019
(Sage)
def A052927_list(prec):
P.<x> = PowerSeriesRing(ZZ, prec)
return P( 1/(1-4*x-x^3) ).list()
A052927_list(30) # G. C. Greubel, Oct 17 2019
(GAP) a:=[1, 4, 16];; for n in [4..30] do a[n]:=4*a[n-1]+a[n-3]; od; a; # G. C. Greubel, Oct 17 2019
CROSSREFS
Cf. A099503.
Sequence in context: A033140 A181879 A243872 * A012781 A132820 A165201
KEYWORD
easy,nonn
AUTHOR
encyclopedia(AT)pommard.inria.fr, Jan 25 2000
STATUS
approved