OFFSET
1,1
LINKS
Michel Marcus, Table of n, a(n) for n = 1..10000
EXAMPLE
a(18) = 31 because the divisors of 18 are [1, 2, 3, 6, 9, 18] and 2 + 3 + 7 + 19 = 31.
MAPLE
T := proc(n, k) local i; numtheory[divisors](n); select(isprime, map(i->i+k, %)); add(i, i=%) end: seq(T(n+1, 1), n=0..20); # Peter Luschny, May 04 2009
MATHEMATICA
a[n_] := Sum[If[PrimeQ[d+1], d+1, 0], {d, Divisors[n]}]; Array[a, 100] (* Jean-François Alcover, Jun 04 2019 *)
PROG
(PARI) a(n) = sumdiv(n, d, if (isprime(q=d+1), q)); \\ Michel Marcus, Aug 14 2017
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Jason Earls, Jun 18 2003
STATUS
approved