%I #2 Mar 30 2012 17:35:24
%S 0,2,3,2,5,1,7,2,3,2,11,1,13,2,2,2,17,1,19,1,2,2,23,1,5,2,3,1,29,1,31,
%T 2,3,2,4,1,37,2,3,1,41,1,43,2,2,2,47,1,7,2,3,2,53,1,4,1,3,2,59,1,61,2,
%U 2,2,4,1,67,2,3,2,71,1,73,2,2,2,5,1,79,1,3,2,83,1,4,2,3,1,89,1,5,2,3,2,4,1
%N Maximum number of copies of proper divisors of n required to express n as a sum; a(1) = 0 by convention.
%C For p prime, a(p^k) = p.
%C a(n) = 1 iff n in A005835.
%C a(n) >= n/(sigma(n)-n) = n/A001065(n), where sigma is A000203; when the right hand side is an integer, this is an equality.
%o (PARI) a(n)=local(ds,p);if(n<=1,return(0));ds=divisors(n);if(#ds==2,return(n));p=prod(i=1,#ds-1,(1+x^ds[i]));for(k=0,n,if(polcoeff(p^k,n)!=0,return(k)))
%o /* The test for #ds==2 is for speed; the program works without it. */
%Y Cf. A164878, A164879, A018818, A027751.
%K nonn
%O 1,2
%A _Franklin T. Adams-Watters_, Aug 29 2009
|