OFFSET
0,4
COMMENTS
a(n) is the maximum value in row n of A080575.
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..300
D. E. Knuth, The Art of Computer Programming, vol. 4. See Section 7.2.1.5, Problem 66, pages 439 and 778.
EXAMPLE
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.
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 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Dan Drake, Feb 21 2005
EXTENSIONS
More terms from Alois P. Heinz, Oct 13 2011.
Typo in definition corrected by Klaus Leeb, Apr 30 2014.
STATUS
approved