login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A123891 Expansion of (1-3*x^2+x^3)/(1-3*x+x^3). 2
1, 3, 6, 18, 51, 147, 423, 1218, 3507, 10098, 29076, 83721, 241065, 694119, 1998636, 5754843, 16570410, 47712594, 137382939, 395578407, 1139022627, 3279684942, 9443476419, 27191406630, 78294534948, 225440128425, 649128978645, 1869092400987, 5381837074536 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,2
REFERENCES
A. Burstein and T. Mansour, Words restricted by 3-letter ..., Annals. Combin., 7 (2003), 1-14.
LINKS
A. Burstein and T. Mansour, Words restricted by 3-letter generalized multipermutation patterns, arXiv:math/0112281 [math.CO], 2001.
FORMULA
a(n) = 3*A052536(n-1), n>0. - R. J. Mathar, Sep 27 2014
MAPLE
seq(coeff(series((1-3*x^2+x^3)/(1-3*x+x^3), x, n+1), x, n), n = 0..40); # G. C. Greubel, Aug 07 2019
MATHEMATICA
Join[{1}, LinearRecurrence[{3, 0, -1}, {3, 6, 18}, 28]] (* Jean-François Alcover, Oct 08 2018 *)
CoefficientList[Series[(1-3x^2+x^3)/(1-3x+x^3), {x, 0, 40}], x] (* Harvey P. Dale, Jan 16 2022 *)
PROG
(PARI) my(x='x+O('x^30)); Vec((1-3*x^2+x^3)/(1-3*x+x^3)) \\ G. C. Greubel, Aug 07 2019
(Magma) R<x>:=PowerSeriesRing(Integers(), 30); Coefficients(R!( (1-3*x^2+x^3)/(1-3*x+x^3) )); // G. C. Greubel, Aug 07 2019
(Sage) ((1-3*x^2+x^3)/(1-3*x+x^3)).series(x, 30).coefficients(x, sparse=False) # G. C. Greubel, Aug 07 2019
(GAP) a:=[3, 6, 18];; for n in [4..30] do a[n]:=3*a[n-1]-a[n-3]; od; Concatenation([1], a); # G. C. Greubel, Aug 07 2019
CROSSREFS
Cf. A052536.
Sequence in context: A161006 A148560 A148561 * A148562 A148563 A148564
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Nov 20 2006
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 10:01 EDT 2024. Contains 371967 sequences. (Running on oeis4.)