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!)
A293741 Number of sets of nonempty words with a total of n letters over binary alphabet such that within each prefix of a word every letter of the alphabet is at least as frequent as the subsequent alphabet letter. 5
1, 1, 2, 5, 10, 23, 51, 111, 243, 530, 1156, 2497, 5421, 11662, 25179, 53991, 116035, 248025, 531045, 1131943, 2415495, 5135914, 10927905, 23182313, 49199819, 104154950, 220543471, 465997148, 984704560, 2076988713, 4380764650, 9225209928, 19424814305 (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)^A001405(j).

MAPLE

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

      b(n-i*j, i-1)*binomial(binomial(i, floor(i/2)), j), j=0..n/i)))

    end:

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

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

MATHEMATICA

b[n_, i_] := b[n, i] = If[n == 0, 1, If[i < 1, 0, Sum[b[n - i*j, i - 1]* Binomial[Binomial[i, Floor[i/2]], j], {j, 0, n/i}]]];

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

Table[a[n], {n, 0, 35}] (* Jean-Fran├žois Alcover, May 29 2019, after Alois P. Heinz *)

PROG

(Python)

from sympy.core.cache import cacheit

from sympy import binomial, floor

@cacheit

def b(n, i): return 1 if n==0 else 0 if i<1 else sum([b(n - i*j, i - 1)*binomial(binomial(i, floor(i//2)), j) for j in range(n//i + 1)])

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

print(map(a, range(36))) # Indranil Ghosh, Oct 15 2017

CROSSREFS

Column k=2 of A293112.

Cf. A001405.

Sequence in context: A087640 A116953 A099516 * A291559 A297074 A099963

Adjacent sequences:  A293738 A293739 A293740 * A293742 A293743 A293744

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 May 8 05:46 EDT 2021. Contains 343653 sequences. (Running on oeis4.)