A123223 Triangle read by rows: T(n,k) = number of ternary Lyndon words of length n with exactly k 1's.
1, 2, 1, 1, 2, 0, 2, 4, 2, 0, 3, 8, 5, 2, 0, 6, 16, 16, 8, 2, 0, 9, 32, 38, 26, 9, 2, 0, 18, 64, 96, 80, 40, 12, 2, 0, 30, 128, 220, 224, 137, 56, 13, 2, 0, 56, 256, 512, 596, 448, 224, 74, 16, 2, 0, 99, 512, 1144, 1536, 1336, 806, 332, 96, 17, 2, 0, 186, 1024, 2560, 3840, 3840
Offset: 0
Examples
Triangle begins: 1; 2, 1; 1, 2, 0; 2, 4, 2, 0; 3, 8, 5, 2, 0; 6, 16, 16, 8, 2, 0; 9, 32, 38, 26, 9, 2, 0; 18, 64, 96, 80, 40, 12, 2, 0; T(n,1) = 2^(n-1) because all words beginning with a 1 and consisting of the rest 2's or 3's are ternary Lyndon words with exactly one 1.
Links
- Alois P. Heinz, Rows n = 0..140, flattened.
Formula
G.f. for columns (except for k=0) given by 1/k*Sum_{d|k} mu(d) x^k/(1-2*x^d)^(k/d) T(0,0) = 1 and T(n,0) = 1/n*Sum_{d|n} mu(d)*2^(n/d) T(n,n) = 0 if n>1, T(n,n-1) = 2.
Comments