OFFSET
1
COMMENTS
A balanced number k is a number such that phi(k) | sigma(k).
If a(x) = 1, a(y) = 1, and gcd(x,y) = 1, then a(x*y) = 1 also. - Antti Karttunen, Jan 01 2023, based on Enrique Pérez Herrero's Sep 05 2010 comment in A020492.
LINKS
FORMULA
a(n) = c(sigma(n)/phi(n)), where c(n) = 1 - ceiling(n) + floor(n).
a(n) = [A063514(n) == 0], where [ ] is the Iverson bracket. - Antti Karttunen, Jan 01 2023
MATHEMATICA
a[n_] := Boole[Divisible[DivisorSigma[1, n], EulerPhi[n]]]; Array[a, 100] (* Amiram Eldar, Feb 01 2022 *)
PROG
(Python)
from math import prod
from sympy import factorint
def A351114(n):
f = factorint(n)
return int(not prod(p*(p**(e+1)-1) for p, e in f.items()) % (n*prod((p-1)**2 for p in f))) # Chai Wah Wu, Feb 01 2022
(PARI) A351114(n) = !(sigma(n)%eulerphi(n)); \\ Antti Karttunen, Jan 01 2023
CROSSREFS
KEYWORD
nonn
AUTHOR
Wesley Ivan Hurt, Jan 31 2022
EXTENSIONS
Data section extended up to a(105) and the name amended with a formula by Antti Karttunen, Jan 01 2023
STATUS
approved