%I #21 Jun 23 2024 01:26:52
%S 1,2,2,2,1,4,1,2,2,2,1,5,1,3,3,2,1,4,1,2,2,2,1,5,1,2,2,3,1,6,1,2,2,2,
%T 2,5,1,2,2,2,1,6,1,2,3,2,1,5,1,2,2,2,1,4,1,4,2,2,1,7,1,2,2,2,1,4,1,2,
%U 2,5,1,5,1,2,3,2,1,5,1,2,2,2,1,7,1,2,2,2,1,6,1,2
%N Number of balanced numbers dividing n.
%C A balanced number k is a number such that phi(k) | sigma(k).
%C Inverse Möbius transform of the characteristic function of balanced numbers (A351114). - _Wesley Ivan Hurt_, Jun 23 2024
%H Robert Israel, <a href="/A351112/b351112.txt">Table of n, a(n) for n = 1..10000</a>
%F a(n) = Sum_{d|n, phi(d)|sigma(d)} 1.
%F a(n) = Sum_{d|n} A351114(d).
%F a(n) = tau(n) - Sum_{d|n} sign(sigma(d) mod phi(d)).
%e a(4) = 2; the balanced divisors of 4 are 1 and 2.
%e a(5) = 1; 1 is the only balanced divisor of 5.
%e a(6) = 4; the balanced divisors of 6 are 1,2,3,6.
%p f:= proc(n) uses numtheory;
%p nops(select(t -> sigma(t) mod phi(t) = 0, divisors(n)))
%p end proc:
%p map(f, [$1..100]); # _Robert Israel_, Nov 28 2023
%t a[n_] := DivisorSum[n, 1 &, Divisible[DivisorSigma[1, #], EulerPhi[#]] &]; Array[a, 100] (* _Amiram Eldar_, Feb 01 2022 *)
%o (PARI) a(n) = sumdiv(n, d, if (!(sigma(d) % eulerphi(d)), 1)); \\ _Michel Marcus_, Feb 01 2022
%Y Cf. A351113 (sum of the balanced numbers dividing n).
%Y Cf. A000005 (tau), A000010 (phi), A000203 (sigma), A020492 (balanced numbers), A023897, A351114.
%K nonn
%O 1,2
%A _Wesley Ivan Hurt_, Jan 31 2022