Suppose we want to estimate the number of primes between $x$ and its square root, say for example between $10$ and $100$ with a sieve.
There are $90 $ numbers so we estimate :
$\pi(10,100) = 90(1-1/2)(1-1/3)(1-1/5)(1-1/7) \\ = 90 * 2 * 4 * 6 /2 / 3 / 5 / 7 = 90 * 24 / 105 = 20,57\ldots$
This is very good. The true value is $21$.
However we know from The prime number theorem and from Mertens’ theorem that this is only a good estimate up to a multiplicative constant.
The problem is easily identified.
On one hand we have that divisions have remainders leading to increasing error terms.
On the other hand we have this :
$(1-1/2)(1-1/3)\cdots(1-1/p_{n-1})(1-1/p_n)$ where $p_n$ is close to The square root of $x$ , leading to meaningless things ( terms ) like $x/(2*3*p_{n-1}*p_n) << 1$.
Truncating is thus the idea.
Let $\omega(n)$ count the number of distinct prime factors of the integer $ n \geq 2$. This $\omega(n)$ is called the prime omega function.
Consider the truncated version of $(1-1/2)(1-1/3)\ldots$ :
$$ \pi(t,t^2 + t) = \sum_{1<i<t} \frac{(-1)^{\omega(i)} t^2}{i} $$
Where $i$ are the squarefree integers.
How much better is this?
More precisely: is $\sum_{1<i<t^2} \frac{(-1)^{\omega(i)} t^2}{i} $ asymptotic to $\frac{t^2}{2 \ln(t)} $ or are we still off by a constant factor ?
And if we are still off by a constant is it the same as Mertens’ or did we improve it - closer to $1$ - ? How about a closed form then?
The analogue question for prime twins:
is $\sum_{2<j<t^2} \frac{(-2)^{\omega(j)} t^2}{j} $ where $j $ are squarefree odd integers, asymptotic to $\frac{t^2}{2 \ln^2(t)}$ or are we still off by a constant factor?
And if we are still off by a constant is it the same as Mertens’ squared or did we improve it - closer to $1$ - ? How about a closed form then?
I was unable to find this online or in libraries.
Let $p_1 = 2$, $p_2 =3$, $p_3=5$, $p_n= $the $n$th prime number
Define 2 as the smallest prime number.
Any larger primes numbers that exist in natural numbers is not a multiple of any smaller prime number.
To generate more prime numbers use a sieve to remove multiples of smaller prime numbers.
The sieve 1 removes multiples of $p_1$
The sieve 2 removes multiples of $p_1$, and $p_2$
The sieve 3 removes multiples of $p_1$, $p_2$, and $p_3$
The sieve n removes multiples of $p_1$, $p_2$, $p_3$, .... , and $p_n$
The non-prime numbers $>1$ in the current sieve can be generated by $xy$ where $x,y$ is an element generated in the previous sieve. Sieve n is a set of arithmetic equations where the common difference is the primorial n and the initial value is a co-prime to the common difference. Limit the number of elements generated by sieve n to the be $p_{n+1}$. All possible co-primes to generate the next sieve can be found in the current sieve.
The sieve 1 $$n<p_2 $$ $$n=0,1,2,3,... $$ $$ p_1*n + 1 = 1,3,5$$ The sieve 2 $$n<p_3 $$ $$n=0,1,2,3,... $$ $$p_1*p_2*n + 1 = 1,7,13,19,25 $$ $$ p_1*p_2*n + 5 = 5,11,17,23,29 $$ The sieve 3 $$n<p_4$$ $$ n=0,1,2,3,... $$ $$ p_1*p_2*p_3*n + 1 = 1,31,61,91,121,151,181 $$ $$ p_1*p_2*p_3*n + 7 = 7,37,67,97,127,157,187 $$ $$ p_1*p_2*p_3*n + 11 = 11,41.71,101,131,161,191 $$ $$ p_1*p_2*p_3*n + 13 = 13,43,73,103,133,163,193 $$ $$ p_1*p_2*p_3*n + 17 = 17,47,77,107,137,167,197 $$ $$ p_1*p_2*p_3*n + 19 = 19,49,79,109,139,169,199 $$ $$ p_1*p_2*p_3*n + 23 = 23,53,83,113,143,173,203 $$ $$ p_1*p_2*p_3*n + 29 = 29,59,89,119,149,179,209 $$
Twin primes are a pair of prime numbers which differ by 2. The first few pairs of twin primes are $(3,5) ,(5,7), (11,13) , (17,19) , (29,31) , (41,43)$. Are there infinitely many twin primes? In sieve 3 there are two pair of arithmetic progressions where the difference between their initial values differ by 2. $$p_1*p_2*p_3*n + 11 = 11,41,71,101,131,161,191 $$ $$ p_1*p_2*p_3*n + 13 = 13, 43,73,103,133,163,193$$ and $$p_1*p_2*p_3*n + 17 $$ $$ p_1*p_3*p_3*n + 19 $$
The numbers generated by a pair of arithmetic progressions which differ by 2 in sieve 3 will become more pairs of arithmetic progressions which differ by 2 in sieve 4.
$$ p_1*p_2*p_3*p_4+11 $$ $$ p_1*p_2*p_3*p_4+13 $$
and
$$ p_1*p_2*p_3*p_4+41 $$ $$ p_1*p_2*p_3*p_4+43 $$
and
$$p_1*p_2*p_3*p_4+71 $$ $$ p_1*p_2*p_3*p_4+73 $$
and
....
Only one element in each arithmetic progression in sieve $n$ generating $p_{n+1}$ elements has the factor of $p_{n+1}$. Therefore each pair of arithmetic progression differing by $a$ will generate $p_{n+1} -2$ arithmetic progressions differing by $a$ in the next sieve.
All that is left is to prove there exist a pair of twin prime numbers in each sieve when each sieve generates a finite number of elements.
If $f$ is a factor of a number in an arithmetic progression generated by a sieve. Then for all sequential $f$ elements generated by the arithmetic progression there exist only one element with the factor $f$.
For example $$p_1*p_2*n+1 = 1,7,13,19,25,31,37,43,49,55,... $$ $5$ is a factor of numbers $25, 55, 85, 115,...$ and each of these numbers are exactly $5$ sequential elements apart. $7$ is a factor of numbers $7, 49, 91, ...$ and each of these numbers are exactly $7$ sequential elements apart. In $5*7$ sequential elements there are exaclty $7$ elements with factors of $5$ and $5$ elements with factors of $7$.
In sieve m let input n $$ n < p_1 * p_2 * p_3 * ... *p_m $$ Generating $p_1*p_2*p_3*...*p_m$ elements per arithmetic progression. The largest number generated in the sieve is
$$ (p_1*p_2*p_3*...*p_m +1)(p_1*p_2*p_3*...*p_m -1)$$ Therefore all non-prime numbers generated per arithmetic progression must have a factor $f$ such that $f>=3$ and $f<=p_1*p_2*p_3*...p_m -1$. Lets take the smallest factor possible $3$ in $$p_1*n+1 =1,3,5,7,9,... $$
only need to count the number of odd numbers $>=3$ and $<=p_1*p_2*p_3*...*p_m$ in natural numbers to count non-prime numbers in arithmetic progression generated in sieve m when input n $$ n < p_1*p_2*p_3*...*p_m $$ because of
The first non-prime number with the factor of $3$ will be $3*q$ where $q>=3$
The next non-prime number with the factor of $3$ will be $3*(q+2)$
The next non-prime number with the factor of $3$ will be $3*(q+2+2)$
The first non-prime number with the factor of $3+2$ without the factor of $3$ will be $(3+2)*q$ where $q>=3+2$
The first non-prime number with the factor of $3+2$ without the factor of $3$ will be $(3+2)*(q+2)$
Therefore in two arithmetic progressions in the same sieve there exist $3$ elements generated by each arithmetic progression sharing the same input $n$ where at most $2$ elements in sharing different n could be non-primes and the last possible $n$ input must have prime numbers in both arithmetic progressions in the same sieve.