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.

A102356 Problem 66 in Knuth's Art of Computer Programming, vol. 4, section 7.2.1.5 asks which integer partition of n produces the most set partitions. The n-th term of this sequence is the number of set partitions produced by that integer partition.

Original entry on oeis.org

1, 1, 1, 3, 6, 15, 60, 210, 840, 3780, 12600, 69300, 415800, 2702700, 12612600, 94594500, 756756000, 4288284000, 38594556000, 244432188000, 1833241410000, 17110253160000, 141159588570000, 1298668214844000, 10389345718752000, 108222351237000000, 1125512452864800000
Offset: 0

Views

Author

Dan Drake, Feb 21 2005

Keywords

Comments

a(n) is the maximum value in row n of A080575.

Examples

			a(4) = 6 because there are 6 set partitions of type {2,1,1}, namely 12/3/4, 13/2/4, 1/23/4, 14/2/3, 1/24/3, 1/2/34; all other integer partitions of 4 produce fewer set partitions.
		

Crossrefs

Programs

  • Maple
    b:= proc(n, i) option remember; `if`(n=0, 1, `if`(i<1, 0,
           max(seq(b(n-i*j, i-1) *n!/i!^j/(n-i*j)!/j!, j=0..n/i))))
        end:
    a:= n-> b(n, n):
    seq(a(n), n=0..40);  # Alois P. Heinz, Apr 13 2012
  • Mathematica
    sp[l_] := (Total[l])!/(Apply[Times, Map[ #! &, l]]*Apply[Times, Map[Count[l, # ]! &, Range[Max[l]]]]) a[n_] := Max[Map[sp, Partitions[n]]]
    b[0, ] = 1; b[, ?NonPositive] = 0; b[n, i_] := b[n, i] = Max[Table[ b[n - i*j, i-1]*n!/i!^j/(n - i*j)!/j!, {j, 0, n/i}]]; a[n_] := b[n, n]; Table[a[n], {n, 0, 40}] (* Jean-François Alcover, Jan 24 2014, after Alois P. Heinz *)

Extensions

More terms from Alois P. Heinz, Oct 13 2011.
Typo in definition corrected by Klaus Leeb, Apr 30 2014.

A255404 Number of different integer partitions of n that produce the maximum number of set partitions for a set of cardinality n.

Original entry on oeis.org

1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 4, 3, 2, 1, 4, 2, 1, 2, 1, 2, 2, 1, 1, 1, 2, 1, 1, 1, 3, 1, 1, 1, 1, 2, 2, 1, 2, 2, 1, 1, 1, 4, 6, 4, 1, 2, 1, 5, 5, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 1, 5, 2, 2, 1, 1, 4, 1, 1, 2, 3, 1, 8, 2, 1, 1, 3, 1, 1, 1, 3, 1, 1, 3, 1, 6, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 1, 3, 2, 1, 1, 1, 1
Offset: 0

Views

Author

Andrei Cretu, Feb 22 2015

Keywords

Comments

If n=Sum_i[n_i], the number of set partitions can be written as sp=n!/Prod_i,j(n_i!m_j!) where m_j is the multiplicity of the integer j in the n_i's. For certain integers, this number is maximized by more than one partition.

Examples

			For n=9, {1,1,2,2,3} maximizes the number of set partitions, while for n=10, this number is maximized by {1,2,3,4}, {1,1,2,3,3}, {1,2,2,2,3} and {1,1,1,2,2,3}.
		

Crossrefs

Programs

  • Mathematica
    Prod[l_] := Apply[Times, Map[#! &, l]]*
        Apply[Times, Map[Count[l, #]! &, Range[Max[Length[l]]]]]
    b[n_] := (Min[Map[Prod, IntegerPartitions[n]]])
    a[n_] := Count[Map[Prod, IntegerPartitions[n]], b[n]]
    Table[a[n], {n, 0, 20}] (* after A102356 *)

Extensions

More terms from Alois P. Heinz, Feb 25 2015
Showing 1-2 of 2 results.