As eryksun points out, the memory requirements for a sieve this large make that approach untenable. For this particular problem, brute force factoring the number can work. That particular number has primes that are much smaller than the number itself: you should be able to do a simple range loop to pick them out.