import random
import math


def define_e(phi_n: int) -> int:
    """Generates a number that is between 1 < e < phi_n and checks if it is coprime with phi_n

    Args:
        phi_n (int): A value generated using the original prime numbers that is "(p - 1) * (q - 1)"

    Returns:
        int: A value that satisfies the condition "1 < e < phi_n"
    """
    while(True):
        e = random.randint(2, phi_n - 1)
        if(math.gcd(e, phi_n) == 1):
            return e