OFFSET
0,3
LINKS
Andrew Howroyd, Table of n, a(n) for n = 0..500
FORMULA
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
EXAMPLE
For n = 0, there is 1 word (the empty word).
For n = 1, there is 1 word: a.
For n = 2, there are 2 words: ab, ba.
For n = 3, there are 7 words: aba, abc, acb, bac, bca, cab, cba.
MAPLE
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));
PROG
(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
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Amanda Lee (amanda.lee(AT)dpcdsb.org), Mar 13 2010
EXTENSIONS
Terms a(11) and beyond from Andrew Howroyd, Jan 07 2020
STATUS
approved