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!)
A241574 Number of ternary words of length n avoiding the pattern 11-11. 1
1, 3, 9, 27, 78, 222, 618, 1686, 4512, 11856, 30624, 77856, 195072, 482304, 1178112, 2846208, 6807552, 16134144, 37920768, 88449024, 204865536, 471465984, 1078591488, 2454061056, 5555355648, 12516851712, 28078768128, 62732107776, 139619991552, 309640298496, 684409749504, 1508036837376, 3313030397952 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,2
LINKS
Jair Taylor, Counting Words with Laguerre Series, Electron. J. Combin., 21 (2014), P2.1.
FORMULA
G.f.: (1 - 5*x + 9*x^2 - 5*x^3 - 2*x^4 + 6*x^5 - 6*x^6 + 6*x^7)/ (1 - 8*x + 24*x^2 - 32*x^3 + 16*x^4).
a(n) = 3*2^(n-7)*(16 + 36*n - n^2 + n^3) for n > 3. - Colin Barker, Jun 06 2015
a(n) = 8*a(n-1) - 24*a(n-2) + 32*a(n-3) - 16*a(n-4) for n > 7. - Colin Barker, Jun 06 2015
E.g.f.: (1/16)*(10 + 9*x + 3*x^2 + x^3 + (6 + 27*x + 3*x^2 + 3*x^3)*exp(2*x)). - G. C. Greubel, Sep 22 2023
MATHEMATICA
LinearRecurrence[{8, -24, 32, -16}, {1, 3, 9, 27, 78, 222, 618, 1686}, 41] (* G. C. Greubel, Sep 22 2023 *)
PROG
(PARI) Vec((6*x^7-6*x^6+6*x^5-2*x^4-5*x^3+9*x^2-5*x+1)/ (16*x^4-32*x^3+24*x^2-8*x+1) + O(x^100)) \\ Colin Barker, Jun 06 2015
(Magma)
A241574:= func< n | n le 3 select 3^n else 3*2^(n-7)*(16+36*n-n^2+n^3) >;
[A241574(n): n in [0..40]]; // G. C. Greubel, Sep 22 2023
(SageMath)
def A241574(n): return 3^n if (n<4) else 3*2^(n-7)*(16 +36*n -n^2 +n^3)
[A241574(n) for n in range(41)] # G. C. Greubel, Sep 22 2023
CROSSREFS
Sequence in context: A139561 A152169 A370142 * A268013 A269613 A006810
KEYWORD
nonn,easy
AUTHOR
N. J. A. Sloane, Apr 26 2014
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 March 28 17:25 EDT 2024. Contains 371254 sequences. (Running on oeis4.)