login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A341865 The cardinality of the largest multiset of positive integers whose product and sum equals n. 1
1, 1, 1, 2, 1, 3, 1, 5, 5, 5, 1, 8, 1, 7, 9, 12, 1, 13, 1, 14, 13, 11, 1, 19, 17, 13, 21, 20, 1, 23, 1, 27, 21, 17, 25, 30, 1, 19, 25, 33, 1, 33, 1, 32, 37, 23, 1, 42, 37, 41, 33, 38, 1, 47, 41, 47, 37, 29, 1, 52, 1, 31, 53, 58 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,4
COMMENTS
The largest multisets are given by the prime factorization of n and 1s added until the sum equals the product.
LINKS
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
Sequence in context: A065548 A152063 A336617 * A347982 A321738 A022458
KEYWORD
nonn
AUTHOR
Nathaniel Gregg, Feb 22 2021
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 19:06 EDT 2024. Contains 371962 sequences. (Running on oeis4.)