OFFSET
1,2
COMMENTS
LINKS
T. D. Noe, Table of n, a(n) for n = 1..10000
EXAMPLE
a(4) = 4, the divisors of 4 are 1, 2 and 4.
Primes arising are 2, 3 = 1 + 2, 5 = 1 + 4 and 7 = 1 + 2 + 4.
MATHEMATICA
Do[l = Subsets[Divisors[n]]; l = Union[Map[Plus @@ #&, l]]; Print[Length[Select[l, PrimeQ]]], {n, 100}] (* Ryan Propper, Jun 04 2006 *)
CountPrimes[n_] := Module[{d=Divisors[n], t, lim, x}, t=CoefficientList[Product[1+x^i, {i, d}], x]; lim=PrimePi[Length[t]-1]; Count[t[[1+Prime[Range[lim]]]], _?(#>0 &)]]; Table[CountPrimes[n], {n, 100}] (* T. D. Noe, Mar 19 2010 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Amarnath Murthy, Apr 23 2004
EXTENSIONS
Corrected and extended by Ryan Propper, Jun 04 2006
STATUS
approved