show/hide this revision's text 15 edited tags
show/hide this revision's text 14 added 4 characters in body; edited title

Marey's problem: Generating all prime numbers in $[n_1,n_2]$

show/hide this revision's text 13 added 20 characters in body

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] for any of these cases 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}$.

show/hide this revision's text 12 added algorithms tag
show/hide this revision's text 11 copy edit
show/hide this revision's text 10 added 57 characters in body; added 3 characters in body
show/hide this revision's text 9 added 1 characters in body
show/hide this revision's text 8 added 129 characters in body; added 1 characters in body; [made Community Wiki]
show/hide this revision's text 7 edited body
show/hide this revision's text 6 added 58 characters in body; deleted 6 characters in body
show/hide this revision's text 5 edited body
show/hide this revision's text 4 edited body; edited body
show/hide this revision's text 3 added 259 characters in body; edited body
show/hide this revision's text 2 added 98 characters in body
show/hide this revision's text 1