A351637 Triangle read by rows: T(n,k) is the number of length n word structures with all distinct run-lengths using exactly k different symbols, n >= 0, k = 0..floor(sqrt(8*n+1)-1/2).
1, 0, 1, 0, 1, 0, 1, 2, 0, 1, 2, 0, 1, 4, 0, 1, 10, 6, 0, 1, 12, 6, 0, 1, 18, 12, 0, 1, 26, 18, 0, 1, 56, 96, 24, 0, 1, 64, 102, 24, 0, 1, 100, 186, 48, 0, 1, 132, 264, 72, 0, 1, 192, 420, 120, 0, 1, 350, 1344, 864, 120, 0, 1, 434, 1572, 936, 120
Offset: 0
Examples
Triangle begins: 1; 0, 1; 0, 1; 0, 1, 2; 0, 1, 2; 0, 1, 4; 0, 1, 10, 6; 0, 1, 12, 6; 0, 1, 18, 12; 0, 1, 26, 18; 0, 1, 56, 96, 24; 0, 1, 64, 102, 24; 0, 1, 100, 186, 48; 0, 1, 132, 264, 72; ... The T(6,1) = 1 word is 111111. The T(6,2) = 10 words are 111112, 111122, 111211, 111221, 112111, 112221, 112222, 122111, 122211, 122222. The T(6,3) = 6 words are 111223, 111233, 112333, 112223, 122333, 122233.
Links
- Andrew Howroyd, Table of n, a(n) for n = 0..958 (rows 0..100)
Crossrefs
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!) ))); [Vecrev(p) | p<-v]} { my(A=T(16)); for(n=1, #A, print(A[n])) }
Comments