login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A293734 Number of multisets 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

%I

%S 1,1,3,7,20,53,157,455,1393,4270,13495,42907,139323,455182,1510831,

%T 5042858,17044789,57891598,198665585,684615958,2379765470,8302157207,

%U 29177909254,102867895209,364981305292,1298526198294,4645569147108,16659856695779,60036951331540

%N Number of multisets 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 Alois P. Heinz, <a href="/A293734/b293734.txt">Table of n, a(n) for n = 0..1000</a>

%F G.f.: Product_{j>=1} 1/(1-x^j)^A005817(j).

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

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

%p end:

%p a:= proc(n) option remember; `if`(n=0, 1, add(add(g(d)

%p *d, d=numtheory[divisors](j))*a(n-j), j=1..n)/n)

%p end:

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

%o (Python)

%o from sympy.core.cache import cacheit

%o from sympy import divisors

%o @cacheit

%o 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 @cacheit

%o 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

%o print(map(a, range(36))) # _Indranil Ghosh_, Oct 15 2017

%Y Column k=4 of A293108.

%Y Cf. A005817.

%K nonn

%O 0,3

%A _Alois P. Heinz_, Oct 15 2017

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 19 20:41 EDT 2019. Contains 323410 sequences. (Running on oeis4.)