login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A090349
Pascal-like triangle read by rows. Number of nonterminal symbols (which generate strings of length k) in a certain "divide-and-conquer" context-free grammar in Chomsky normal form that generates all permutations of n symbols.
2
1, 2, 1, 3, 3, 1, 4, 6, 0, 1, 5, 10, 10, 0, 1, 6, 15, 20, 0, 0, 1, 7, 21, 35, 35, 0, 0, 1, 8, 28, 0, 70, 0, 0, 0, 1, 9, 36, 84, 126, 126, 0, 0, 0, 1, 10, 45, 120, 0, 252, 0, 0, 0, 0, 1
OFFSET
1,2
LINKS
P. R. J. Asveld, Generating all permutations by context-free grammars in Chomsky normal form, Theoretical Computer Science 354 (2006) 118-130.
FORMULA
a(n,k) = C(n,k), if k = ceiling(n/(2^i)) or k = floor(n/(2^i)) for some i with 0 <= i <= ceiling(log_2 n); a(n,k)=0 otherwise.
EXAMPLE
Triangle begins:
1;
2, 1;
3, 3, 1;
4, 6, 0, 1;
5, 10, 10, 0, 1;
6, 15, 20, 0, 0, 1;
7, 21, 35, 35, 0, 0, 1;
8, 28, 0, 70, 0, 0, 0, 1;
9, 36, 84, 126, 126, 0, 0, 0, 1;
10, 45, 120, 0, 252, 0, 0, 0, 0, 1;
...
Example grammar: S -> EF | FE | GH | HG | IJ | JI, E -> AB | BA, F -> CD | DC, G -> AC | CA, H -> BD | DB, I -> AD | DA, J-> BC | CB, A-> a, B-> b, C-> c, D -> d; so a(4,4)=#{S}=1, a(4,3)=#{}=0, a(4,2)=#{E,F,G,H,I,J}=6 and a(4,1)= #{A,B,C,D}=4.
CROSSREFS
Sequence in context: A185095 A177888 A073020 * A157379 A212139 A093430
KEYWORD
nonn,tabl
AUTHOR
Peter R. J. Asveld, Jan 29 2004
STATUS
approved