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!)
A123892 Expansion of g.f.: (1+x^2)*(1+2*x^2)/(1-3*x+3*x^2-6*x^3+2*x^4-2*x^5). 4
1, 3, 9, 24, 63, 167, 444, 1179, 3129, 8306, 22051, 58539, 155400, 412535, 1095149, 2907266, 7717839, 20488343, 54389880, 144387411, 383301505, 1017540554, 2701238539, 7170907923, 19036423288, 50535499231, 134155279397, 356138541458, 945431750839, 2509813152639 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,2
COMMENTS
a(n) = number of words of length n over {0,1,2} which do not contain a factor jkj with j>k. - N. J. A. Sloane, May 21 2013
LINKS
A. Burstein and T. Mansour, Words restricted by 3-letter generalized multipermutation patterns, arXiv:math/0112281 [math.CO], 2001; Annals. Combin., 7 (2003), 1-14.
FORMULA
G.f. can be written 1/(1-x*(1+1/(1+x^2)+1/(1+2*x^2))). - N. J. A. Sloane, May 21 2013
MAPLE
seq(coeff(series((1+x^2)*(1+2*x^2)/(1-3*x+3*x^2-6*x^3+2*x^4-2*x^5), x, n+1), x, n), n = 0..30); # G. C. Greubel, Aug 06 2019
MATHEMATICA
LinearRecurrence[{3, -3, 6, -2, 2}, {1, 3, 9, 24, 63}, 30] (* Jean-François Alcover, Jan 09 2019 *)
PROG
(PARI) my(x='x+O('x^30)); Vec((1+x^2)*(1+2*x^2)/(1-3*x+3*x^2-6*x^3+2*x^4 -2*x^5)) \\ G. C. Greubel, Aug 06 2019
(Magma) R<x>:=PowerSeriesRing(Integers(), 30); Coefficients(R!( (1+x^2)*(1+2*x^2)/(1-3*x+3*x^2-6*x^3+2*x^4-2*x^5)) )); // G. C. Greubel, Aug 06 2019
(Sage) ((1+x^2)*(1+2*x^2)/(1-3*x+3*x^2-6*x^3+2*x^4-2*x^5)).series(x, 30).coefficients(x, sparse=False) # G. C. Greubel, Aug 06 2019
(GAP) a:=[1, 3, 9, 24, 63];; for n in [6..30] do a[n]:=3*a[n-1]-3*a[n-2] +6*a[n-3]-2*a[n-4]+2*a[n-5]; od; a; # G. C. Greubel, Aug 06 2019
CROSSREFS
Sequence in context: A123888 A166290 A097134 * A269531 A064831 A153582
KEYWORD
nonn,easy
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 19 11:31 EDT 2024. Contains 371792 sequences. (Running on oeis4.)