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!)
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 #5 Jan 07 2020 17:38:20

%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.

%p myseq:=n->add(add(binomial(n-na+1,na)*binomial(n-na,nb),nb=floor((n-na+1)/2)..min(n-na,na)),na=floor((n+2)/3)..floor((n+1)/2));

%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 | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 05:49 EDT 2024. Contains 371964 sequences. (Running on oeis4.)