i registered here today, because i am struggling with an problem from project euler.
Scince i am not a native speaker, please forgive some typos or grammar mistakes

Of course i can guess, that a direct discussion of the problems is not wanted so i will try to keep it general.
I tried to solve a harder problem (501) and i already have an idea for a solution. But this solution would require that i get a list of all primes from 2 to 10^12.
I managed to optimize my prime finding programm and now it gives me the primes from 2 to 10^6 in around 2.5 seconds. But you can imagine that it takes much to long for 10^12. So my idea was to put in a primetest like Miller-Rabin prime test, so that i only proof the numbers which are with a higher propability prime.
But acutally this slowed down the complete programme.
Of course i am not asking for the solution to the problem: i only want to ask, if its possible to calculate these numbers in a moderate time or if i am totally abroad with my ansatz.