cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-2 of 2 results.

A254686 Number of ways to put n red and n blue balls into n indistinguishable boxes.

Original entry on oeis.org

1, 1, 5, 19, 74, 248, 814, 2457, 7168, 19928, 53688, 139820, 354987, 878434, 2128102, 5052010, 11781881, 27019758, 61035671, 135928105, 298784144, 648726349, 1392474574, 2956730910, 6214668074, 12937060340, 26686392239, 54572423946, 110680119454, 222710856175, 444776676764
Offset: 0

Views

Author

Brian Chen, Feb 08 2015

Keywords

Comments

See a comment on A254811 about multiset partitions and the Knuth reference. - Wolfdieter Lang, Mar 26 2015

Examples

			For n = 2 the a(2) = 5 ways to put 2 red balls and 2 blue balls into 2 indistinguishable boxes are (RRBB)(), (RRB)(B), (RBB)(R), (RR)(BB), (RB)(RB).
		

Crossrefs

Column k=2 of A256384.
Main diagonal of A277239.

Programs

  • Maple
    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(6^n$2,n):
    seq(a(n), n=0..20);  # Alois P. Heinz, Mar 26 2015
  • Mathematica
    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[6^n, 6^n, n]; Table[a[n], {n, 0, 20}] (* Jean-François Alcover, Jan 08 2016, after Alois P. Heinz *)

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

Views

Author

Alois P. Heinz, Mar 27 2015

Keywords

Comments

A(n,k) is also the number of k-partite partitions of (n)^k into at most n k-tuples. A(2,2) = 5: [(2,2)], [(2,1),(0,1)], [(2,0),(0,2)], [(1,2),(1,0)], [(1,1),(1,1)].

Examples

			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, ...
		

Crossrefs

Columns k=0-3 give: A000012, A000041, A254686, A254811.
Rows n=0+1,2-3 give: A000012, A007051, A256493.
Cf. A219727.

Programs

  • Mathematica
    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 *)
Showing 1-2 of 2 results.