login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

A351114
Characteristic function of balanced numbers: a(n) = 1 if phi(n) divides sigma(n), otherwise 0.
10
1, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1
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.
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
Cf. A000010 (phi), A000203 (sigma), A020492 (balanced numbers), A063514.
Sequence in context: A204443 A105349 A096606 * A128190 A128189 A303340
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