OFFSET
0,3
COMMENTS
For n > 1, to find the partition whose parts multiply to the maximum product, select from the partitions without "1" those with the most parts and from these the one with the smallest largest part. - Felix Huber, Apr 04 2025
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..10000 (terms n = 1..1000 from T. D. Noe)
Tomislav Doslic, Maximum product over partitions into distinct parts, J. of Integer Sequences, Vol. 8 (2005), Article 05.5.8.
Andrew V. Sills and Robert Schneider, The product of parts or "norm" of a partition, arXiv:1904.08004 [math.NT], 2019. Also in Integers, (2020) Vol. 20A, Article #A13.
FORMULA
a(n) = (b + k)!/(b!*(b + k - r)) for n >= 2, where k = floor((sqrt(8*n + 9) - 1)/2), b = floor(d/(k - 1)) + 1, r = d mod (k - 1), d = n - k*(k + 1)/2 + 1. - Felix Huber, Apr 04 2025
EXAMPLE
The partitions of n = 4 into distinct parts are (4) and (1, 3) with the products of partitions being 4 and 3 respectively and the maximum product is a(4) = max(4, 3) = 4. - David A. Corneth, Apr 28 2020 [Corrected by Felix Huber, Apr 04 2025]
The partitions of n = 11 into distinct parts are (11), (1, 10), (2, 9), (3, 8), (4, 7), (5, 6), (1, 2, 8), (1, 3, 7), (1, 4, 6), (2, 3, 6), (2, 4, 5) and (1, 2, 3, 5) with the products of partitions being 11, 10, 18, 24, 28, 30, 16, 21, 24, 36, 40 and 30 respectively and the maximum product is a(11) = max(11, 10, 18, 24, 28, 30, 16, 21, 24, 36, 40, 30) = 40. Alternatively, find the length of the longest partitions that don't contain 1 (length 3) and from those the one with the smallest largest part: (2, 4, 5). - Felix Huber, Apr 04 2025 [Corrected and expanded by Paul Bischof, Jul 31 2025]
MAPLE
b:= proc(n, i) option remember; `if`(i*(i+1)/2<n, 0,
`if`(n=0, 1, max(b(n, i-1), i*b(n-i, min(n-i, i-1)))))
end:
a:= n-> b(n$2):
seq(a(n), n=0..50); # Alois P. Heinz, Apr 19 2019
# Alternative:
A034893:=proc(n)
local b, k, r;
if n<2 then return 1 fi;
k:=floor((sqrt(8*n+9)-1)/2);
b:=iquo(n-k*(k+1)/2+1, k-1, r)+1;
return (b+k)!/(b!*(b+k-r))
end proc;
seq(A034893(n), n=0..45); # Felix Huber, Apr 04 2025
MATHEMATICA
Table[Max[Times@@@Select[IntegerPartitions[n], Max[Tally[#][[All, 2]]]<2&]], {n, 50}] (* Harvey P. Dale, May 28 2017 *)
b[n_, i_] := b[n, i] = If[i(i+1)/2<n, 0, If[n==0, 1, Max[b[n, i-1], i b[n-i, Min[n-i, i-1]]]]];
a[n_] := b[n, n];
Table[a[n], {n, 0, 50}] (* Jean-François Alcover, Aug 21 2019, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn,nice
AUTHOR
EXTENSIONS
a(0)=1 prepended by Alois P. Heinz, Apr 19 2019
STATUS
approved
