OFFSET
1,2
COMMENTS
Inverse Möbius transform of n * c(n), where c(n) is the characteristic function of refactorable numbers (A336040). - Wesley Ivan Hurt, Jun 21 2024
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..20000
Eric Weisstein's World of Mathematics, Refactorable Number
FORMULA
a(n) = Sum_{d|n} d * c(d), where c = A336040.
a(n) = Sum_{d|n} d * (1 - ceiling(d/tau(d)) + floor(d/tau(d))), where tau(n) is the number of divisors of n (A000005).
a(p) = 1 for odd primes p. - Wesley Ivan Hurt, Nov 28 2021
EXAMPLE
a(6) = 3; The divisors of 6 are {1,2,3,6}. 1 and 2 are refactorable since d(1) = 1|1 and d(2) = 2|2, so a(6) = 1 + 2 = 3.
a(7) = 1; The divisors of 7 are {1,7} and 1 is the only refactorable divisor of 7. So a(7) = 1.
a(8) = 11; The divisors of 8 are {1,2,4,8}. 1, 2 and 8 are refactorable since d(1) = 1|1, d(2) = 2|2 and d(8) = 4|8, so a(8) = 1 + 2 + 8 = 11.
a(9) = 10; The divisors of 9 are {1,3,9}. 1 and 9 are refactorable since d(1) = 1|1 and d(9) = 3|9, so a(9) = 1 + 9 = 10.
MATHEMATICA
a[n_] := DivisorSum[n, # &, Divisible[#, DivisorSigma[0, #]] &]; Array[a, 80] (* Amiram Eldar, Nov 24 2021 *)
PROG
(PARI) isr(n) = n%numdiv(n)==0; \\ A033950
a(n) = sumdiv(n, d, if (isr(d), d)); \\ Michel Marcus, Jul 20 2020
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Wesley Ivan Hurt, Jul 17 2020.
STATUS
approved