OFFSET
0,2
COMMENTS
The number of (distinct) prime factors in a(n) is A003056(n) = floor((sqrt(1+8*n)-1)/2).
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..3000
EXAMPLE
The partitions of n=5 into distinct parts are {[5], [4,1], [3,2]}, encodings give {prime(5), prime(4)*prime(1), prime(3)*prime(2)} = {11, 7*2, 5*3} = {11, 14, 15}. So a(5) = max(11,14,15) = 15.
MAPLE
b:= proc(n, i) option remember; `if`(n=0, 1, `if`(i<1, 0,
max(b(n, i-1), `if`(i>n, 0, b(n-i, i-1)*ithprime(i)))))
end:
a:= n-> b(n$2):
seq(a(n), n=0..50);
MATHEMATICA
b[n_, i_] := b[n, i] = If[n==0, 1, If[i<1, 0, Max[b[n, i-1], If[i>n, 0, b[n - i, i-1]*Prime[i]]]]]; a[n_] := b[n, n]; Table[a[n], {n, 0, 50}] (* Jean-François Alcover, Feb 07 2017, translated from Maple *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Sep 05 2014
STATUS
approved