Prime Generator @ http://www.spoj.com/problems/PRIME1/