Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #17 Feb 10 2022 08:30:07
%S 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,
%T 42,40,28,30,72,32,63,48,54,48,25,38,60,56,30,42,96,44,40,33,72,48,40,
%U 57,43,72,46,54,48,72,36,80,90,60,76,62,96,41,127,84,144,68,58,96,144,72
%N Sum of the divisors of n that are either squarefree, prime powers, or both.
%H Michael De Vlieger, <a href="/A351395/b351395.txt">Table of n, a(n) for n = 1..10000</a>
%F a(n) = Sum_{d|n} d * sign(mu(d)^2 + [omega(d) = 1]).
%e 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.
%t Array[DivisorSum[#, #*Sign[MoebiusMu[#]^2 + Boole[PrimeNu[#] == 1]] &] &, 71] (* _Michael De Vlieger_, Feb 10 2022 *)
%o (PARI) a(n) = sumdiv(n, d, if (issquarefree(d) || isprimepower(d), d)); \\ _Michel Marcus_, Feb 10 2022
%Y Cf. A001221, A008683, A246655.
%Y Sums of divisors: A048250 (squarefree), A023889 (prime powers), A008472 (prime).
%K nonn
%O 1,2
%A _Wesley Ivan Hurt_, Feb 09 2022