Is there are some references to algorithms that generate the set of prime numbers located between two given numbers n1 and n2?
I would like to consider the cases when n1 is large while n2-n1 is small or while n2-n1 is large.
If we consider these cases:
[1] n1=$2^{10}$ & n2=$2^{11}$;
[2] n1=$2^{40}$ & n2=$2^{45}$, (modified to [2a]);
[3] n1=$2^{100}$ & n2=$2^{101}$, (modified to [3a]);
[4] n1=$2^{1000}$ & n2=$2^{1001}$, (modified to [4a]);
Is there is a well known algorithm to generate the set of all primes p ∈ [n1,n2] without generating all primes p < n1?
By considering for example these cases:
[2a] n1=$2^{40}$ & n2=$2^{40}+2^{20}$;
[3a] n1=$2^{100}$ & n2=$2^{100}+2^{20}$;
[4a] n1=$2^{1000}$ & n2=$2^{1000}+2^{20}$.