OFFSET
1,6
COMMENTS
Inverse Möbius transform of (n' mod 2), where n' is the arithmetic derivative of n (A003415). - Wesley Ivan Hurt, Jun 29 2024
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
FORMULA
a(n) = Sum_{d|n} ((d') mod 2).
a(n) = tau(n)/2 - (1/2) * Sum_{d|n} (-1)^(d').
From Robert Israel, Jun 05 2023: (Start)
If n = 2^k * m where m is odd and k >= 1, a(n) = a(m) + A000005(m).
If n is odd and squarefree, a(n) = 2^(A001222(n)-1).
If p is an odd prime, a(p^k) = ceil(k/2).
(End)
EXAMPLE
a(12) = 3; 12 has 3 divisors whose arithmetic derivatives are odd: 2' = 1, 3' = 1, and 6' = 5.
MAPLE
aderodd:= proc(n) local t; option remember;
(n*add(t[2]/t[1], t=ifactors(n)[2]))::odd
end proc:
f:= proc(n) local t;
nops(select(aderodd, numtheory:-divisors(n)))
end proc:
map(f, [$1..100]); # Robert Israel, Jun 05 2023
MATHEMATICA
d[1] = 0; d[n_] := n*Plus @@ ((Last[#]/First[#]) & /@ FactorInteger[n]); a[n_] := DivisorSum[n, 1 &, OddQ[d[#]] &]; Array[a, 100] (* Amiram Eldar, May 02 2022 *)
PROG
(PARI) ad(n) = vecsum([n/f[1]*f[2]|f<-factor(n+!n)~]); \\ A003415
a(n) = sumdiv(n, d, ad(d) % 2); \\ Michel Marcus, May 02 2022
CROSSREFS
KEYWORD
nonn
AUTHOR
Wesley Ivan Hurt, May 01 2022
STATUS
approved