OFFSET
1,2
COMMENTS
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.
LINKS
T. D. Noe, Table of n, a(n) for n=1..1000
EXAMPLE
a(4) = 4 because the divisors (1,2,4) produce 4 primes (2,1+2,1+4,1+2+4).
MATHEMATICA
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}]
CROSSREFS
KEYWORD
nonn
AUTHOR
T. D. Noe, Jun 17 2009
STATUS
approved