login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A293733 Number of multisets of nonempty words with a total of n letters over ternary 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, 3, 7, 19, 48, 131, 348, 954, 2607, 7212, 19995, 55816, 156246, 439267, 1238397, 3502004, 9927260, 28208628, 80322048, 229161413, 654966245, 1875074366, 5376298225, 15437286706, 44385247519, 127776425727, 368276055467, 1062618076382, 3069264747076 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
LINKS
FORMULA
G.f.: Product_{j>=1} 1/(1-x^j)^A001006(j).
a(n) ~ c * 3^n / n^(3/2), where c = 11.84175157992103588081767200532703865225243959779980786519467770732598276486... - Vaclav Kotesovec, May 30 2019
MAPLE
g:= proc(n) option remember; `if`(n<2, 1,
g(n-1)+add(g(k)*g(n-k-2), k=0..n-2))
end:
a:= proc(n) option remember; `if`(n=0, 1, add(add(g(d)
*d, d=numtheory[divisors](j))*a(n-j), j=1..n)/n)
end:
seq(a(n), n=0..35);
MATHEMATICA
g[n_] := g[n] = If[n<2, 1, g[n-1] + Sum[g[k]*g[n-k-2], {k, 0, n-2}]];
a[n_] := a[n] = If[n==0, 1, Sum[Sum[g[d]*d, {d, Divisors[j]}]*a[n-j], {j, 1, n}]/n];
Table[a[n], {n, 0, 35}] (* Jean-François Alcover, May 30 2019, after Alois P. Heinz *)
PROG
(Python)
from sympy.core.cache import cacheit
from sympy import divisors
@cacheit
def g(n): return 1 if n<2 else g(n - 1) + sum([g(k)*g(n - k - 2) for k in range(n - 1)])
@cacheit
def a(n): return 1 if n==0 else sum([sum([g(d)*d for d in divisors(j)])*a(n - j) for j in range(1, n + 1)])//n
print(map(a, range(36))) # Indranil Ghosh, Oct 15 2017
CROSSREFS
Column k=3 of A293108.
Cf. A001006.
Sequence in context: A049117 A146810 A246493 * A073063 A370169 A007288
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 | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 16 00:00 EDT 2024. Contains 371696 sequences. (Running on oeis4.)