%I #3 Mar 30 2012 17:22:54
%S 0,2,1,4,1,6,1,6,2,7,1,20,1,5,4,11,1,16,1,19,5,5,1,66,2,5,4,17,1,64,1,
%T 18,4,6,6,120,1,5,5,63,1,62,1,18,11,5,1,237,1,15,3,18,1,47,6,60,5,7,1,
%U 863,1,3,20,31,6,58,1,16,3,62,1,808,1,4,13,16,4,56,1,216,5,5,1,839,5,5
%N Number of primes formed as the sum of distinct divisors of n, counted with repetition.
%C That is, if a number has d divisors, then we compute all 2^d sums of distinct divisors and count how many primes are formed. Sequence A093893 lists the n that produce no primes except for the primes that divide n. The Mathematica code works well for numbers up to about 221760, which has 168 divisors and creates a polynomial of degree 950976. The coefficients of the prime powers of that polynomial sum to 28719307224839120896278355000770621322645671888269, the number of primes formed by the divisors of 221760. Records appear to occur at n=10 and n in A002182, the highly composite numbers.
%H T. D. Noe, <a href="/A161510/b161510.txt">Table of n, a(n) for n=1..1000</a>
%e a(4) = 4 because the divisors (1,2,4) produce 4 primes (2,1+2,1+4,1+2+4).
%t CountPrimes[n_] := Module[{d=Divisors[n],t,lim,x}, t=CoefficientList[Product[1+x^d[[i]], {i,Length[d]}], x]; lim=PrimePi[Length[t]1]; Plus@@t[[1+Prime[Range[lim]]]]]; Table[CountPrimes[n], {n,100}]
%K nonn
%O 1,2
%A _T. D. Noe_, Jun 17 2009
