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!)
A254811 Number of ways to put n red, n blue, and n green balls into n indistinguishable boxes. 3

%I #22 Jan 08 2016 05:29:17

%S 1,1,14,171,1975,20096,187921,1609727,12827392,95701382,673873648,

%T 4503935052,28728268655,175644353402,1033386471872,5870110651051,

%U 32289704469531,172438417419444,896076816466546,4540173176769827,22469530730320361

%N Number of ways to put n red, n blue, and n green balls into n indistinguishable boxes.

%C a(n) is the sum of the number of partitions of the multiset {R^n, B^n, G^n} into 1, 2, ..., n parts (as observed in the pink box comments by Joerg Arndt and Tom Edgar). a(0) := 1. For partitions of multisets see the Knuth reference. - _Wolfdieter Lang_, Mar 26 2015

%C a(n) is also the number of factorizations of m^n into at most n factors where m is a product of 3 distinct primes. a(2) = 14: (2*3*5)^2 = 900 has 14 factorizations into at most 2 factors: 900, 30*30, 36*25, 45*20, 50*18, 60*15, 75*12, 90*10, 100*9, 150*6, 180*5, 225*4, 300*3, 450*2. - _Alois P. Heinz_, Mar 26 2015

%D D. A. Knuth, The Art of Computer Programming. Volume 4, Fascicle 3, Addison-Wesley, 2010, pp. 74 - 77.

%H Brian Chen, <a href="/A254811/b254811.txt">Table of n, a(n) for n = 0..64</a>

%e For n = 2 the a(2) = 14 ways to put 2 red balls, 2 blue balls, and 2 green balls into 2 indistinguishable boxes are (RRBBGG)(), (RRBBG)(G), (RRBGG)(B), (RBBGG)(R), (RRBB)(GG), (RRGG)(BB), (BBGG)(RR), (RRBG)(BG), (RBBG)(RG), (RBGG)(RB), (RRB)(BGG), (RBB)(RGG), (RRG)(BBG), (RGB)(RGB).

%p with(numtheory):

%p b:= proc(n, k, i) option remember;

%p `if`(n>k, 0, 1) +`if`(isprime(n) or i<2, 0, add(

%p `if`(d>k, 0, b(n/d, d, i-1)), d=divisors(n) minus {1, n}))

%p end:

%p a:= n-> b(30^n$2,n):

%p seq(a(n), n=0..8); # _Alois P. Heinz_, Mar 26 2015

%t b[n_, k_, i_] := b[n, k, i] = If[n>k, 0, 1] + If[PrimeQ[n] || i<2, 0, Sum[ If[d>k, 0, b[n/d, d, i-1]], {d, Divisors[n][[2 ;; -2]]}]]; a[n_] := b[30^n, 30^n, n]; Table[a[n], {n, 0, 8}] (* _Jean-François Alcover_, Jan 08 2016, after _Alois P. Heinz_ *)

%Y Cf. A254686.

%Y Column k=3 of A256384.

%K nonn

%O 0,3

%A _Brian Chen_, Feb 08 2015

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 23 03:30 EDT 2024. Contains 371906 sequences. (Running on oeis4.)