Better, more memory-efficient sieving. Still needs work though.
Better sieving function using GNU Multiprecision library