Half-dimensional interval sieve (source code)

= Half-dimensional interval sieve

Sieve an interval of length $z$ by the <prime> two and the <primes> congruent to three modulo four, with local densities $g(p)=1/p$. Take $D=z^{1/2}$ and $L=\sqrt D$. The <truncated Euler-product lower bound>, the <Mertens first theorem> and the <reciprocal-prime sum in residue class one modulo four> give $J\gg\sqrt{\log z}$. The interval counts have bounded remainders, whose sum is $O(D\log^2D)$ by the <summatory bound for three to the prime omega>. Hence the number surviving is $O(z/\sqrt{\log z})$, uniformly in the location of the interval.