A351645 Triangle read by rows: T(n,k) is the number of length n word structures using exactly k different symbols with all distinct run-lengths and the first run length of a symbol less than that of previous symbols, n >= 0, k = 0..floor(sqrt(8*n+1)-1/2).
1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 1, 0, 1, 2, 0, 1, 5, 1, 0, 1, 6, 1, 0, 1, 9, 2, 0, 1, 13, 3, 0, 1, 28, 16, 1, 0, 1, 32, 17, 1, 0, 1, 50, 31, 2, 0, 1, 66, 44, 3, 0, 1, 96, 70, 5, 0, 1, 175, 224, 36, 1, 0, 1, 217, 262, 39, 1, 0, 1, 308, 428, 71, 2, 0, 1, 425, 619, 105, 3
Offset: 0
Examples
Triangle begins: 1; 0, 1; 0, 1; 0, 1, 1; 0, 1, 1; 0, 1, 2; 0, 1, 5, 1; 0, 1, 6, 1; 0, 1, 9, 2; 0, 1, 13, 3; 0, 1, 28, 16, 1; 0, 1, 32, 17, 1; 0, 1, 50, 31, 2; 0, 1, 66, 44, 3; 0, 1, 96, 70, 5; ... The T(8,1) = 1 word is 11111111. The T(8,2) = 9 words are 11111112, 11111122, 11111211, 11111221, 11111222, 11112111, 11112221, 11121111, 11211111. The T(8,3) = 2 words are 11111223, 11112223. In the last example, the word 11111223 corresponds with 6 words in A351637 which are 11111223, 11111233, 11222223, 11233333, 12222233, 12233333.
Links
- Andrew Howroyd, Table of n, a(n) for n = 0..958 (rows 0..100)
Programs
-
PARI
P(n) = {Vec(-1 + prod(k=1, n, 1 + y*x^k + O(x*x^n)))} R(u, k) = {k*[subst(serlaplace(p)/y, y, k-1) | p<-u]} T(n)={my(u=P(n), v=concat([1], sum(k=1, n, R(u, k)*sum(r=k, n, y^r*binomial(r, k)*(-1)^(r-k)/(r!)^2) ))); [Vecrev(p) | p<-v]} { my(A=T(16)); for(n=1, #A, print(A[n])) }
Comments