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 A292845 #14 Mar 19 2022 03:25:37 %S A292845 0,1,3,28,325,4976,92869,2038842,51397801,1461081781,46192638386, %T A292845 1606531631321,60921659773609,2500525907856718,110403919405245712, %U A292845 5216038547426332891,262495788417549517393,14015335940464667636300,791161963786588958170705 %N A292845 Total number of words beginning with the first letter of an n-ary alphabet in all sets of nonempty words with a total of n letters. %H A292845 Alois P. Heinz, <a href="/A292845/b292845.txt">Table of n, a(n) for n = 0..382</a> %e A292845 For n=2 and alphabet {a,b} we have 5 sets: {aa}, {ab}, {ba}, {bb}, {a,b}. There is a total of 3 words beginning with the first alphabet letter, thus a(2) = 3. %p A292845 h:= proc(n, i, k) option remember; `if`(n=0, [1, 0], `if`(i<1, 0, add( %p A292845 (p-> p+[0, p[1]*j])(binomial(k^i, j)*h(n-i*j, i-1, k)), j=0..n/i))) %p A292845 end: %p A292845 a= n-> `if`(n=0, 0, h(n$3)[2]/n): %p A292845 seq(a(n), n=0..22); %t A292845 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]*h[n - i*j, i - 1, k]], {j, 0, n/i}]]]; %t A292845 a[n_] := If[n == 0, 0, h[n, n, n][[2]]/n]; %t A292845 Table[a[n], {n, 0, 22}] (* _Jean-François Alcover_, Mar 19 2022, after _Alois P. Heinz_ *) %Y A292845 Cf. A216158, A292804, A292805, A292873. %K A292845 nonn %O A292845 0,3 %A A292845 _Alois P. Heinz_, Sep 24 2017