%I #23 Jun 29 2024 22:55:43
%S 1,3,2,4,2,5,2,12,11,5,2,18,2,5,4,13,2,32,2,7,4,5,2,50,3,5,12,7,2,9,2,
%T 14,4,5,4,81,2,5,4,55,2,9,2,7,14,5,2,52,3,7,4,7,2,34,4,71,4,5,2,83,2,
%U 5,14,15,4,9,2,7,4,9,2,185,2,5,6,7,4,9,2,136,13,5,2,107
%N a(n) = Sum_{d|n} d^c(d), where c is the characteristic function of refactorable numbers (A336040).
%C For each divisor d of n, add d if d is refactorable (i.e., if the number of divisors of d divides d), otherwise add 1. For example, the divisors of 8 are 1,2,4,8 and the refactorable divisors of 8 are 1,2,8. The sum is then a(8) = 1 + 2 + 1 + 8 = 12.
%C Inverse Möbius transform of n^c(n), where c = A336040. - _Wesley Ivan Hurt_, Jun 29 2024
%H Antti Karttunen, <a href="/A349322/b349322.txt">Table of n, a(n) for n = 1..20000</a>
%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/RefactorableNumber.html">Refactorable Number</a>
%F a(n) = A335182(n) + A349658(n). - _Antti Karttunen_, Nov 24 2021
%F a(p) = 2 for odd primes p. - _Wesley Ivan Hurt_, Nov 28 2021
%t a[n_] := DivisorSum[n, If[Divisible[#, DivisorSigma[0, #]], #, 1] &]; Array[a, 100] (* _Amiram Eldar_, Nov 16 2021 *)
%o (PARI) isrf(n) = n%numdiv(n)==0; \\ A336040
%o a(n) = sumdiv(n, d, if (isrf(d), d, 1)); \\ _Michel Marcus_, Nov 16 2021
%Y Cf. A033950, A208251, A335182, A335665, A336040, A336041, A349658.
%K nonn
%O 1,2
%A _Wesley Ivan Hurt_, Nov 14 2021