login
A351395
Sum of the divisors of n that are either squarefree, prime powers, or both.
1
1, 3, 4, 7, 6, 12, 8, 15, 13, 18, 12, 16, 14, 24, 24, 31, 18, 21, 20, 22, 32, 36, 24, 24, 31, 42, 40, 28, 30, 72, 32, 63, 48, 54, 48, 25, 38, 60, 56, 30, 42, 96, 44, 40, 33, 72, 48, 40, 57, 43, 72, 46, 54, 48, 72, 36, 80, 90, 60, 76, 62, 96, 41, 127, 84, 144, 68, 58, 96, 144, 72
OFFSET
1,2
LINKS
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
Sums of divisors: A048250 (squarefree), A023889 (prime powers), A008472 (prime).
Sequence in context: A034690 A069192 A076887 * A140782 A284587 A097011
KEYWORD
nonn
AUTHOR
Wesley Ivan Hurt, Feb 09 2022
STATUS
approved