%I #17 Jul 06 2024 11:50:28
%S 1,2,3,10,37,151,674,3263,17007,94828,562594,3534961,23428397,
%T 163187870,1190538144,9066908419,71837342107,590009213152,
%U 5004416730974,43667740987637,390497323261737,3565602957116674,33130941174471484,312322981161532615,2979191694795132887
%N Word structures of length n using a 10-ary alphabet, including a special character, which may occur in the leftmost word position only if n=1.
%C a(n) is also the number of ways of placing n labeled balls into 9 indistinguishable boxes and one special box, where the first ball is allowed to be member of the special box only if n=1.
%H Alois P. Heinz, <a href="/A164933/b164933.txt">Table of n, a(n) for n = 0..1000</a>
%H <a href="/index/Rec#order_08">Index entries for linear recurrences with constant coefficients</a>, signature (45, -861, 9135, -58674, 233100, -557864, 732960, -403200).
%F a(n) = Sum_{m=0..n-1} C(n-1,m) Sum_{k=0..9} S2 (n-m, k), if n>1; a(n) = n+1 else.
%F a(n) = 2119/11520*2^n +103/840*3^n +53/1152*4^n +11/900*5^n +6^n/384 +7^n/2520 +8^n/11520 +10^n/403200, if n>1; a(n) = n+1 else.
%F G.f.: (403200*x^9 -478089*x^8 +35157*x^7 +202072*x^6 -136061*x^5 +42574*x^4 -7538*x^3 +774*x^2 -43*x+1) / ((2*x-1)* (3*x-1)* (4*x-1)* (5*x-1)* (6*x-1)* (7*x-1)* (8*x-1)* (10*x-1)).
%e a(0) = 1, the only possible word structure is the empty word.
%e a(1) = 2, word structures are a and X, where X denotes the special character.
%e a(2) = 3, word structures are aa, ab, aX.
%e a(3) = 10, word structures are aaa, aab, aba, baa, abc, aaX, abX, aXa, aXb, aXX.
%p # first program:
%p a:= n-> `if`(n<2, n+1, 2119/11520*2^n +103/840*3^n +53/1152*4^n +11/900*5^n +6^n/384 +7^n/2520 +8^n/11520 +10^n/403200): seq(a(n), n=0..30);
%p # second program:
%p a:= n-> `if`(n<2, n+1, add(add(Stirling2(n-m, k), k=0..9) *binomial(n-1, m), m=0..n-1)): seq(a(n), n=0..30);
%Y Cf. A007318, A048993, A164863, A164864, A000079, A000244, A007582, A086444, A005493.
%K easy,nonn
%O 0,2
%A _Alois P. Heinz_, Aug 31 2009