Is there are some references to algorithms that generate the set of prime numbers located between two given numbers n_{1} and n_{2}?

I would like to consider the cases when n_{1} is large while n_{2}-n_{1} is small or while n_{2}-n_{1} is large.

If we consider these cases:

[1] n_{1}=$2^{10}$ & n_{2}=$2^{11}$;

[2] n_{1}=$2^{40}$ & n_{2}=$2^{45}$, (modified to [2a]);

[3] n_{1}=$2^{100}$ & n_{2}=$2^{101}$, (modified to [3a]);

[4] n_{1}=$2^{1000}$ & n_{2}=$2^{1001}$, (modified to [4a]);

Is there is a well known algorithm to generate the set of all primes p ∈ [n_{1},n_{2}] without generating all primes p < n_{1}?

By considering for example these cases:

[2a] n_{1}=$2^{40}$ & n_{2}=$2^{40}+2^{20}$;

[3a] n_{1}=$2^{100}$ & n_{2}=$2^{100}+2^{20}$;

[4a] n_{1}=$2^{1000}$ & n_{2}=$2^{1000}+2^{20}$.

notuse the Gries algorithm! It's actually slower than the Sieve of Eratosthenes. See Pritchard's "Improved incremental prime number sieves". $\endgroup$ – Charles Jul 26 '10 at 20:22