OFFSET
1,2
COMMENTS
For each divisor d of n, add n if d is prime, otherwise add 1. For example, the divisors of 6 are 1,2,3,6. Then we have 1 + 6 + 6 + 1 = 14.
FORMULA
a(p) = p+1 for primes p. - Wesley Ivan Hurt, Nov 28 2021
MAPLE
a:= n-> (n-1)*nops(ifactors(n)[2]) + numtheory[tau](n):
seq(a(n), n=1..60); # Alois P. Heinz, Nov 10 2021
MATHEMATICA
a[n_] := DivisorSum[n, n^Boole[PrimeQ[#]] &]; Array[a, 70] (* Amiram Eldar, Nov 11 2021 *)
PROG
(PARI) a(n) = sumdiv(n, d, if (isprime(d), n, 1)); \\ Michel Marcus, Nov 11 2021
CROSSREFS
KEYWORD
nonn
AUTHOR
Wesley Ivan Hurt, Nov 10 2021
STATUS
approved