OFFSET
1,2
COMMENTS
Inverse Möbius transform of A008472.
LINKS
David A. Corneth, Table of n, a(n) for n = 1..10000
N. J. A. Sloane, Transforms
FORMULA
G.f.: Sum_{k>=1} A008472(k)*x^k/(1 - x^k).
L.g.f.: -log(Product_{k>=1} (1 - x^k)^(A008472(k)/k)) = Sum_{n>=1} a(n)*x^n/n.
a(p^k) = p*k, where p is a prime.
a(n) = Sum_{p|n} p*tau(n/p), where p is a prime and tau(n) = A000005(n). - Ridouane Oudra, Oct 08 2019
a(n) = Sum_{p|n} p*tau(n)*(e_p-1)/(e_p) where e_p is the exponent of p in the factorization of n. - David A. Corneth, Oct 08 2019
a(n) = Sum_{d|n} sopf(d). - Wesley Ivan Hurt, May 23 2021
EXAMPLE
a(12) = 13 as 12 has 6 divisors and 2 * 6 * (2/3) + 3 * 6 * (1/2) = 17. - David A. Corneth, Oct 08 2019
MAPLE
with(numtheory): seq(add(p*tau(n/p), p in factorset(n)), n=1..80); # Ridouane Oudra, Oct 08 2019
MATHEMATICA
Table[Sum[Total[Select[Divisors[d], PrimeQ]], {d, Divisors[n]}], {n, 70}]
nmax = 70; Rest[CoefficientList[Series[Sum[DivisorSum[k, # &, PrimeQ[#] &] x^k/(1 - x^k), {k, 1, nmax}], {x, 0, nmax}], x]]
nmax = 70; Rest[CoefficientList[Series[-Log[Product[(1 - x^k)^(DivisorSum[k, # &, PrimeQ[#] &]/k), {k, 1, nmax}]], {x, 0, nmax}], x] Range[0, nmax]]
PROG
(PARI) a(n) = sumdiv(n, d, my(f=factor(d)); vecsum(f[, 1])); \\ Michel Marcus, Oct 08 2019
(PARI) a(n) = my(f = factor(n), nd = numdiv(f)); sum(i = 1, #f~, f[i, 1] * nd / (f[i, 2] + 1) * f[i, 2]) \\ David A. Corneth, Oct 08 2019
(Magma) [0] cat [&+[&+[PrimeDivisors(d)[i]:i in [1..#PrimeDivisors(d)]]:d in Set(Divisors(n)) diff {1}]:n in [2..70]]; // Marius A. Burtea, Oct 08 2019
(Magma) [0] cat [&+[p*#Divisors(n div p):p in PrimeDivisors(n)]:n in [2..70]]; // Marius A. Burtea, Oct 08 2019 (According to the formula given by Ridouane Oudra)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Ilya Gutkovskiy, Sep 11 2018
STATUS
approved