Implementation of segmented sieve of eratosthenes
http://programmingpraxis.com/2010/02/05/segmented-sieve-of-eratosthenes/
SPOJ PRIME1