The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A174247 Number of words of length n composed of the letters a, b, and c with at least as many a's as b's, and at least as many b's as c's, and no a's adjacent. 1

%I

%S 1,1,2,7,9,21,76,104,255,936,1321,3327,12250,17682,45200,166420,

%T 244431,630586,2318863,3453662,8964527,32909250,49579091,129250365,

%U 473604092,720390529,1884080667,6890849851,10567693128,27706723888,101151927464,156225285080,410396361463

%N Number of words of length n composed of the letters a, b, and c with at least as many a's as b's, and at least as many b's as c's, and no a's adjacent.

%H Andrew Howroyd, <a href="/A174247/b174247.txt">Table of n, a(n) for n = 0..500</a>

%F a(n) = Sum_{i=floor((n+2)/3)..floor((n+1)/2)} Sum_{j=floor((n-i+1)/2)..min(n-i, i)} binomial(n-i+1, i)*binomial(n-i, j). - _Andrew Howroyd_, Jan 07 2020, after Maple

%e For n = 0, there is 1 word (the empty word).

%e For n = 1, there is 1 word: a.

%e For n = 2, there are 2 words: ab, ba.

%e For n = 3, there are 7 words: aba, abc, acb, bac, bca, cab, cba.

%o (PARI) a(n)={sum(i=(n+2)\3, (n+1)\2, sum(j=(n-i+1)\2, min(n-i, i), binomial(n-i+1, i)*binomial(n-i, j)))} \\ _Andrew Howroyd_, Jan 07 2020

%K nonn,easy

%O 0,3

%A Amanda Lee (amanda.lee(AT)dpcdsb.org), Mar 13 2010

%E Terms a(11) and beyond from _Andrew Howroyd_, Jan 07 2020

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

Last modified May 18 19:58 EDT 2021. Contains 344002 sequences. (Running on oeis4.)