OFFSET
1,2
LINKS
Michael De Vlieger, Table of n, a(n) for n = 1..10000
FORMULA
a(n) = Sum_{d|n} d * sign(mu(d)^2 + [omega(d) = 1]).
EXAMPLE
a(36) = 25; 36 has 4 squarefree divisors 1,2,3,6 (where the primes 2 and 3 are both squarefree and 1st powers of primes) and 2 (additional) divisors that are powers of primes, 2^2 and 3^2. The sum of the divisors is then 1+2+3+4+6+9 = 25.
MATHEMATICA
Array[DivisorSum[#, #*Sign[MoebiusMu[#]^2 + Boole[PrimeNu[#] == 1]] &] &, 71] (* Michael De Vlieger, Feb 10 2022 *)
PROG
(PARI) a(n) = sumdiv(n, d, if (issquarefree(d) || isprimepower(d), d)); \\ Michel Marcus, Feb 10 2022
CROSSREFS
KEYWORD
nonn
AUTHOR
Wesley Ivan Hurt, Feb 09 2022
STATUS
approved