public static void main(String[] args) {
        if (args.length == 1) {
            int n = Integer.parseInt(args[0]);
            System.out.println("n = " + n);
            ArrayList<Integer> primes = generate_primes_from_1_to_n(n);
            for(Integer prime : primes) {
                for(int j = 2; j < prime; ++j) {
                    assert (prime % j != 0);
                }
            }
        } else {
            Random r = new Random();
            for (int times = 0; times < 100; ++times) {
                int n = r.nextInt(999999) + 2;
                System.out.println("n = " + n);
                ArrayList<Integer> primes = generate_primes_from_1_to_n(n);
                for(Integer prime : primes) {
                    for(int j = 2; j < prime; ++j) {
                        assert (prime % j != 0);
                    }
                }
            }
        }

    }