def ec_phi(n, d): if is_prime(n): return n-1 if not n % d: if is_prime(d): q = n / d return (d-1)*ec_phi(q, int(q**.5) + 1) return ec_phi(n, d-1)
def is_strong(n): d = digit_sum(n) if is_prime(n/d): return True return False