OFFSET
0,3
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..10000
EXAMPLE
a(0) = 1: the empty product.
a(p) = p for any prime p: [p]-> p.
a(12) = 48: [2,4,6]-> 48.
a(20) = 200: [1,4,5,10]-> 200.
a(24) = 1152: [1,2,3,4,6,8]-> 1152.
MAPLE
a:= proc(n) local b, l;
l:= sort([numtheory[divisors](n)[]]);
b:= proc(n, i) option remember; `if`(n=0, 1, `if`(i<1, 0,
max(b(n, i-1), `if`(l[i]>n, 0, l[i] *b(n-l[i], i-1)))))
end; forget(b);
b(n, nops(l))
end:
seq(a(n), n=0..80);
MATHEMATICA
a[n_] := a[n] = Module[{b, l}, l = Divisors[n]; b[m_, i_] := b[m, i] = If[m == 0, 1, If[i<1, 0, Max[b[m, i-1], If[l[[i]]>m, 0, l[[i]]*b[m-l[[i]], i-1] ]]]]; b[n, Length[l]]]; Table[a[n], {n, 0, 80}] (* Jean-François Alcover, Feb 16 2017, translated from Maple *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Nov 14 2012
STATUS
approved