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 A293743 #19 May 15 2021 06:16:45 %S A293743 1,1,2,6,15,44,129,386,1185,3690,11725,37578,122577,402477,1340640, %T A293743 4490368,15219148,51825464,178235039,615461671,2143127872,7488890027, %U A293743 26357539204,93050275129,330544091758,1177338456789,4216288462832,15134924595039,54588972553934 %N A293743 Number of sets of nonempty words with a total of n letters over quaternary alphabet such that within each prefix of a word every letter of the alphabet is at least as frequent as the subsequent alphabet letter. %H A293743 Alois P. Heinz, <a href="/A293743/b293743.txt">Table of n, a(n) for n = 0..1000</a> %F A293743 G.f.: Product_{j>=1} (1+x^j)^A005817(j). %p A293743 g:= proc(n) option remember; `if`(n<2, 1, (4*(2*n+3)* %p A293743 g(n-1)+16*(n-1)*n*g(n-2))/((n+3)*(n+4))) %p A293743 end: %p A293743 b:= proc(n, i) option remember; `if`(n=0, 1, `if`(i<1, 0, %p A293743 add(b(n-i*j, i-1)*binomial(g(i), j), j=0..n/i))) %p A293743 end: %p A293743 a:= n-> b(n$2): %p A293743 seq(a(n), n=0..35); %t A293743 g[n_] := g[n] = If[n<2, 1, (4(2n+3) g[n-1]+16(n-1) n g[n-2])/((n+3)(n+4))]; %t A293743 b[n_, i_] := b[n, i] = If[n==0, 1, If[i<1, 0, Sum[b[n-i j, i-1] Binomial[ g[i], j], {j, 0, n/i}]]]; %t A293743 a[n_] := b[n, n]; %t A293743 Array[a, 35, 0] (* _Jean-François Alcover_, May 31 2019, from Maple *) %o A293743 (Python) %o A293743 from sympy.core.cache import cacheit %o A293743 from sympy import binomial %o A293743 @cacheit %o A293743 def g(n): return 1 if n<2 else (4*(2*n + 3)*g(n - 1) + 16*(n - 1)*n*g(n - 2))//((n + 3)*(n + 4)) %o A293743 @cacheit %o A293743 def b(n, i): return 1 if n==0 else 0 if i<1 else sum([b(n - i*j, i - 1)*binomial(g(i), j) for j in range(n//i + 1)]) %o A293743 def a(n): return b(n, n) %o A293743 print([a(n) for n in range(36)]) # _Indranil Ghosh_, Oct 15 2017 %Y A293743 Column k=4 of A293112. %Y A293743 Cf. A005817. %K A293743 nonn %O A293743 0,3 %A A293743 _Alois P. Heinz_, Oct 15 2017