A277239
Number A(n,k) of factorizations of m^n into exactly k factors, where m is a product of two distinct primes; square array A(n,k), n>=0, k>=0, read by antidiagonals.
Original entry on oeis.org
1, 1, 0, 1, 1, 0, 1, 2, 1, 0, 1, 2, 5, 1, 0, 1, 2, 8, 8, 1, 0, 1, 2, 9, 19, 13, 1, 0, 1, 2, 9, 27, 42, 18, 1, 0, 1, 2, 9, 30, 74, 78, 25, 1, 0, 1, 2, 9, 31, 95, 168, 139, 32, 1, 0, 1, 2, 9, 31, 105, 248, 363, 224, 41, 1, 0, 1, 2, 9, 31, 108, 300, 614, 703, 350, 50, 1, 0
Offset: 0
Square array A(n,k) begins:
1, 1, 1, 1, 1, 1, 1, 1, 1, ...
0, 1, 2, 2, 2, 2, 2, 2, 2, ...
0, 1, 5, 8, 9, 9, 9, 9, 9, ...
0, 1, 8, 19, 27, 30, 31, 31, 31, ...
0, 1, 13, 42, 74, 95, 105, 108, 109, ...
0, 1, 18, 78, 168, 248, 300, 325, 335, ...
0, 1, 25, 139, 363, 614, 814, 938, 1002, ...
0, 1, 32, 224, 703, 1367, 1996, 2457, 2741, ...
0, 1, 41, 350, 1297, 2879, 4642, 6128, 7168, ...
Columns k=0-10 give:
A000007,
A000012,
A000982(n+1),
A101427,
A277240,
A277241,
A277242,
A277243,
A277244,
A277245,
A277246.
A256384
Number A(n,k) of factorizations of m^n into at most n factors, where m is a product of exactly k distinct primes; square array A(n,k), n>=0, k>=0, read by antidiagonals.
Original entry on oeis.org
1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 5, 3, 1, 1, 1, 14, 19, 5, 1, 1, 1, 41, 171, 74, 7, 1, 1, 1, 122, 1675, 1975, 248, 11, 1, 1, 1, 365, 16683, 64182, 20096, 814, 15, 1, 1, 1, 1094, 166699, 2203215, 2213016, 187921, 2457, 22, 1, 1, 1, 3281, 1666731, 76727374, 268446852, 69406700, 1609727, 7168, 30, 1
Offset: 0
A(2,2) = 5: (2*3)^2 = 36 has 5 factorizations into at most 2 factors: 36, 2*18, 3*12, 4*9, 6*6.
Square array A(n,k) begins:
1, 1, 1, 1, 1, 1, ...
1, 1, 1, 1, 1, 1, ...
1, 2, 5, 14, 41, 122, ...
1, 3, 19, 171, 1675, 16683, ...
1, 5, 74, 1975, 64182, 2203215, ...
1, 7, 248, 20096, 2213016, 268446852, ...
-
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[0, ] = 1; A[1, ] = 1; A[, 0] = 1; A[n, k_] := With[{t = Times @@ Prime[ Range[k] ]}, b[t^n, t^n, n]]; Table[diag = Table[A[n-k, k], {k, n, 0, -1}]; Print[ diag]; diag, {n, 0, 10}] // Flatten (* Jean-François Alcover, Jan 08 2016, after Alois P. Heinz *)
A254811
Number of ways to put n red, n blue, and n green balls into n indistinguishable boxes.
Original entry on oeis.org
1, 1, 14, 171, 1975, 20096, 187921, 1609727, 12827392, 95701382, 673873648, 4503935052, 28728268655, 175644353402, 1033386471872, 5870110651051, 32289704469531, 172438417419444, 896076816466546, 4540173176769827, 22469530730320361
Offset: 0
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).
- D. A. Knuth, The Art of Computer Programming. Volume 4, Fascicle 3, Addison-Wesley, 2010, pp. 74 - 77.
-
with(numtheory):
b:= proc(n, k, i) option remember;
`if`(n>k, 0, 1) +`if`(isprime(n) or i<2, 0, add(
`if`(d>k, 0, b(n/d, d, i-1)), d=divisors(n) minus {1, n}))
end:
a:= n-> b(30^n$2,n):
seq(a(n), n=0..8); # Alois P. Heinz, Mar 26 2015
-
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 *)
Showing 1-3 of 3 results.
Comments