This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A292873 #10 Mar 19 2022 03:25:11 %S A292873 0,1,5,37,415,6051,109476,2348767,58191451,1631827927,51029454163, %T A292873 1758883278967,66200568699170,2699977173047181,118561410689195358, %U A292873 5574984887552288475,279398986674750754195,14863338415349068099348,836304620387823727353480 %N A292873 Total number of words beginning with the first letter of an n-ary alphabet in all multisets of nonempty words with a total of n letters. %H A292873 Alois P. Heinz, <a href="/A292873/b292873.txt">Table of n, a(n) for n = 0..382</a> %e A292873 For n=2 and alphabet {a,b} we have 7 multisets: {aa}, {ab}, {ba}, {bb}, {a,a}, {a,b}, {b,b}. There is a total of 5 words beginning with the first alphabet letter, thus a(2) = 5. %p A292873 h:= proc(n, i, k) option remember; `if`(n=0, [1, 0], `if`(i<1, 0, add( %p A292873 (p-> p+[0, p[1]*j])(binomial(k^i+j-1, j)*h(n-i*j, i-1, k)), j=0..n/i))) %p A292873 end: %p A292873 a:= n-> `if`(n=0, 0, h(n$3)[2]/n): %p A292873 seq(a(n), n=0..22); %t A292873 h[n_, i_, k_] := h[n, i, k] = If[n == 0, {1, 0}, If[i < 1, {0, 0}, Sum[ Function[p, p + {0, p[[1]]*j}][Binomial[k^i + j - 1, j]*h[n - i*j, i - 1, k]], {j, 0, n/i}]]]; %t A292873 a[n_] := If[n == 0, 0, h[n, n, n][[2]]/n]; %t A292873 Table[a[n], {n, 0, 22}] (* _Jean-François Alcover_, Mar 19 2022, after _Alois P. Heinz_ *) %Y A292873 Cf. A252654, A292845. %K A292873 nonn %O A292873 0,3 %A A292873 _Alois P. Heinz_, Sep 25 2017