public static long prochainPremier(long num) {
        if (num <= 1) throw new IllegalArgumentException();

        if (num != 2 && num % 2 == 0) {
            num++;
        }
        while (!Num1.estPremier(num)) {
            num += 2;
        }
        return num;
    }