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!)
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

%I #6 Oct 03 2018 21:34:57

%S 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,

%T 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,

%U 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

%N Maximum number of copies of prime divisors of n, with repetition, required to express n as a sum; a(1) = 0 by convention.

%C 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).

%C a(n) >= n/sopfr(n), where sopfr is A001414; when the right hand side is an integer, this is an equality.

%H Antti Karttunen, <a href="/A164878/b164878.txt">Table of n, a(n) for n = 1..12024</a>

%e 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.

%o (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)))

%Y Cf. A164879, A164880, A027746.

%K nonn,look

%O 1,6

%A _Franklin T. Adams-Watters_, Aug 29 2009

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 19 02:45 EDT 2024. Contains 371782 sequences. (Running on oeis4.)