OFFSET
0,3
COMMENTS
Permuting the symbols will not change the structure.
Equivalently, a(n) is the number of restricted growth strings [s(0), s(1), ..., s(n-1)] where s(0)=0 and s(i) <= 1 + max(prefix) for i >= 1 and all runs are distinct.
LINKS
Andrew Howroyd, Table of n, a(n) for n = 0..200
EXAMPLE
The a(4) = 10 words are 1111, 1112, 1121, 1122, 1211, 1222, 1123, 1223, 1233, 1234.
PROG
(PARI) \\ See A351641 for R, S.
seq(n)={my(q=S(n)); concat([1], sum(k=1, n, R(q^k-1)*sum(r=k, n, binomial(r, k)*(-1)^(r-k)/r!) )); }
CROSSREFS
KEYWORD
nonn
AUTHOR
Andrew Howroyd, Feb 15 2022
STATUS
approved