l=primes(2e6);disp(l(scanf('%d')))
1 2 3 100000
2 3 5 1299709
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!