A161510 Number of primes formed as the sum of distinct divisors of n, counted with repetition.
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, 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, 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
Offset: 1
Keywords
Examples
a(4) = 4 because the divisors (1,2,4) produce 4 primes (2,1+2,1+4,1+2+4).
Links
- Felix Huber, Table of n, a(n) for n = 1..10000 (first 1000 terms from T. D. Noe)
Programs
-
Maple
with(NumberTheory): A161510:=proc(n) local b,l,j; l:=[(Divisors(n))[]]: b:=proc(m,i) option remember; `if`(m=0,1,`if`(i<1,0,b(m,i-1)+`if`(l[i]>m,0,b(m-l[i],i-1)))) end; add(b(ithprime(j),nops(l)),j=1..pi(sigma(n))); end: seq(A161510(n),n=1..77); # Felix Huber, Jul 24 2025
-
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}]
-
PARI
a(n) = my(nb=0, d=divisors(n)); forsubset(#d, s, nb+=isprime(sum(i=1, #s, d[s[i]]))); nb; \\ Michel Marcus, Jul 24 2025
Comments