pub fn nth(arg: u64) -> Result<u64, u64> {
    if arg <= 0 {
        return Err(0);
    }

    let mut count = 0;
    let mut prime = 1;

    while count < arg {
        prime += 1;
        if is_prime(prime) {
            count += 1
        }
    }

    return Ok(prime);
}

pub fn is_prime(inp_int: u64) -> bool {
    for i in 2..(((inp_int as f64).sqrt() as u64) + 1) {
        if inp_int % i == 0 {
            return false;
        }
    }
    return true;
}