OFFSET
1,4
COMMENTS
The largest multisets are given by the prime factorization of n and 1s added until the sum equals the product.
FORMULA
a(n) = n - Sum_(d_i*(p_i-1)), where n = Product_(p_i^d_i).
a(n) = n - A059975(n). - Joerg Arndt, Feb 22 2021
EXAMPLE
For n = 12, the set of size a(12) = 8 is {1,1,1,1,1,2,2,3}.
PROG
(PARI) a(n) = my(f=factor(n)); n - sum(k=1, #f~, f[k, 2]*(f[k, 1]-1)); \\ Michel Marcus, Feb 26 2021
CROSSREFS
KEYWORD
nonn
AUTHOR
Nathaniel Gregg, Feb 22 2021
STATUS
approved