login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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. 4
1, 1, 2, 6, 15, 44, 129, 386, 1185, 3690, 11725, 37578, 122577, 402477, 1340640, 4490368, 15219148, 51825464, 178235039, 615461671, 2143127872, 7488890027, 26357539204, 93050275129, 330544091758, 1177338456789, 4216288462832, 15134924595039, 54588972553934 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,3

LINKS

Alois P. Heinz, Table of n, a(n) for n = 0..1000

FORMULA

G.f.: Product_{j>=1} (1+x^j)^A005817(j).

MAPLE

g:= proc(n) option remember; `if`(n<2, 1, (4*(2*n+3)*

       g(n-1)+16*(n-1)*n*g(n-2))/((n+3)*(n+4)))

    end:

b:= proc(n, i) option remember; `if`(n=0, 1, `if`(i<1, 0,

      add(b(n-i*j, i-1)*binomial(g(i), j), j=0..n/i)))

    end:

a:= n-> b(n$2):

seq(a(n), n=0..35);

MATHEMATICA

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))];

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}]]];

a[n_] := b[n, n];

Array[a, 35, 0] (* Jean-Fran├žois Alcover, May 31 2019, from Maple *)

PROG

(Python)

from sympy.core.cache import cacheit

from sympy import binomial

@cacheit

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))

@cacheit

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)])

def a(n): return b(n, n)

print([a(n) for n in range(36)]) # Indranil Ghosh, Oct 15 2017

CROSSREFS

Column k=4 of A293112.

Cf. A005817.

Sequence in context: A151515 A264746 A052870 * A001444 A293744 A293745

Adjacent sequences:  A293740 A293741 A293742 * A293744 A293745 A293746

KEYWORD

nonn

AUTHOR

Alois P. Heinz, Oct 15 2017

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 21 08:18 EDT 2021. Contains 345358 sequences. (Running on oeis4.)