cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A052541 Expansion of 1/(1-3*x-x^3).

This page as a plain text file.
%I A052541 #42 Jul 02 2025 16:01:58
%S A052541 1,3,9,28,87,270,838,2601,8073,25057,77772,241389,749224,2325444,
%T A052541 7217721,22402387,69532605,215815536,669848995,2079079590,6453054306,
%U A052541 20029011913,62166115329,192951400293,598883212792,1858815753705,5769398661408,17907079197016
%N A052541 Expansion of 1/(1-3*x-x^3).
%C A052541 A transform of A000244 under the mapping mapping g(x)->(1/(1-x^3))g(x/(1-x^3)). - _Paul Barry_, Oct 20 2004
%C A052541 a(n) equals the number of n-length words on {0,1,2,3} such that 0 appears only in a run which length is a multiple of 3. - _Milan Janjic_, Feb 17 2015
%H A052541 G. C. Greubel, <a href="/A052541/b052541.txt">Table of n, a(n) for n = 0..1000</a>
%H A052541 INRIA Algorithms Project, <a href="http://ecs.inria.fr/services/structure?nbr=475">Encyclopedia of Combinatorial Structures 475</a>
%H A052541 Milan Janjic, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL19/Janjic/janjic73.html">Binomial Coefficients and Enumeration of Restricted Words</a>, Journal of Integer Sequences, 2016, Vol 19, #16.7.3
%H A052541 José L. Ramírez, Víctor F. Sirvent, <a href="http://ami.ektf.hu/uploads/papers/finalpdf/AMI_45_from91to105.pdf">A note on the k-Narayana sequence</a>, Annales Mathematicae et Informaticae, 45 (2015) pp. 91-105.
%H A052541 <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (3,0,1).
%F A052541 G.f.: 1/(1 - 3*x - x^3).
%F A052541 a(n) = 3*a(n-1) + a(n-3), with a(0)=1, a(1)=3.
%F A052541 a(n) = Sum_{alpha = RootOf(-1+3*x+x^3)} (1/15)*(4 + alpha + 2*alpha^2) * alpha^(-n-1).
%F A052541 a(n) = Sum_{k=0..floor(n/3)} binomial(n-2*k, k) * 3^(n-3*k). - _Paul Barry_, Oct 20 2004
%p A052541 spec := [S,{S=Sequence(Union(Z,Z,Z,Prod(Z,Z,Z)))},unlabeled]: seq(combstruct[count](spec,size=n), n=0..30);
%t A052541 CoefficientList[Series[x/(1-3*x-x^3), {x, 0, 30}], x] (* _Zerinvary Lajos_, Mar 29 2007 *)
%t A052541 LinearRecurrence[{3,0,1},{1,3,9},30] (* _Vladimir Joseph Stephan Orlovsky_, Jan 28 2012 *)
%o A052541 (PARI) my(x='x+O('x^30)); Vec(x/(1-3*x-x^3)) \\ _G. C. Greubel_, May 09 2019
%o A052541 (Magma) R<x>:=PowerSeriesRing(Integers(), 30); Coefficients(R!( x/(1-3*x-x^3) )); // _G. C. Greubel_, May 09 2019
%o A052541 (Sage) (x/(1-3*x-x^3)).series(x, 30).coefficients(x, sparse=False) # _G. C. Greubel_, May 09 2019
%o A052541 (GAP) a:=[1,3,9];; for n in [4..30] do a[n]:=3*a[n-1]+a[n-3]; od; a; # _G. C. Greubel_, May 09 2019
%Y A052541 Cf. A076264.
%K A052541 easy,nonn
%O A052541 0,2
%A A052541 encyclopedia(AT)pommard.inria.fr, Jan 25 2000
%E A052541 More terms from _James Sellers_, Jun 06 2000