login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A164878
Maximum number of copies of prime divisors of n, with repetition, required to express n as a sum; a(1) = 0 by convention.
3
0, 1, 1, 1, 1, 2, 1, 2, 2, 2, 1, 2, 1, 2, 3, 2, 1, 3, 1, 3, 3, 2, 1, 3, 3, 2, 3, 4, 1, 3, 1, 4, 3, 2, 5, 4, 1, 2, 3, 4, 1, 4, 1, 4, 5, 2, 1, 5, 4, 5, 3, 4, 1, 6, 5, 5, 3, 2, 1, 5, 1, 2, 6, 6, 5, 5, 1, 4, 3, 5, 1, 6, 1, 2, 6, 4, 7, 5, 1, 7, 7, 2, 1, 6, 5, 2, 3, 6, 1, 8, 7, 4, 3, 2, 5, 8, 1, 7, 6, 8, 1, 5, 1, 6, 7
OFFSET
1,6
COMMENTS
For p prime, a(p^k) = ceiling(p^(k-1)/k); in particular, a(p) = 1. For p and q distinct primes, a(pq) = min(p,q).
a(n) >= n/sopfr(n), where sopfr is A001414; when the right hand side is an integer, this is an equality.
LINKS
EXAMPLE
For n = 12, we have the representation 2+2+2+3+3. Since there are two 2's available, this can be done with 2 copies of the prime factors: 2+2'+3 from the first copy, and 2+3 from the second. Thus a(12) = 2.
PROG
(PARI) a(n)=local(fm, p); if(n<=1, return(0)); fm=factor(n); p=prod(i=1, matsize(fm)[1], (1+x^fm[i, 1])^fm[i, 2]); for(k=0, n, if(polcoeff(p^k, n)!=0, return(k)))
CROSSREFS
KEYWORD
nonn,look
AUTHOR
STATUS
approved