2

For the sieve of Eratosthenes, let $E_k$ be the number of elements left after removing all primes up to $p_k$ and their multiples from the set $\left\{1,2,3,...p_k\#\right\}$ where $p_k\#=\prod\limits_{i=1}^k p_i$ is the primorial.


Then $E_k$ is given by

$$E_k=p_k\#\ \prod\limits_{i=1}^k \left(1-\frac{1}{p_i}\right)=\prod\limits_{i=1}^k \left(p_i-1\right)\tag{1}$$

which can be written in terms of the more general Euler totient function

$$\phi(n)=n \prod\limits_{p|n}\left(1-\frac{1}{p}\right)\tag{2}$$

as

$$E_k=\phi\left(p_k\#\right).\tag{3}$$


After applying the sieve of Eratosthenes described above, the number of composites remaining in the interval $p_k<n\le p_k\#$ is given by

$$E_k-1+\left(\pi\left(p_k\#\right)-\pi\left(p_k\right)\right)\tag{4}$$

where $\pi(x)$ is the prime counting function. Formula (4) above corresponds to OEIS entry A066264 which gives the number of composites $<\ p_k\#$ with all prime factors $>\ p_k$, and I believe OEIS entry A285784 corresponds to the union of the non-prime values left after applying the prime sieve for increasing values of $k$ where values duplicated by different values of $k$ are deleted.


For the twin-prime sieve, let $N_k$ be the number of elements left after removing all multiples of primes up to $p_k$ and their associates (defined as pairs of numbers of the form $6 n\pm 1$) from the set $\left\{1,2,3,...p_k\#\right\}$.


Then I believe $N_k$ is given by

$$N_k=p_k\#\ \prod\limits_{i=2}^k \left(1-\frac{2}{p_i}\right)=2 \prod\limits_{i=2}^k \left(p_i-2\right)\tag{5}$$

which can be written in terms of the more general function

$$\phi_2(n)=n \prod\limits_{p>2\,\land\,p|n}\left(1-\frac{2}{p}\right)\tag{6}$$

as

$$N_k=\phi_2\left(p_k\#\right).\tag{7}$$


After applying the twin-prime sieve described above, I believe the number of non-twin primes remaining in the interval $p_k+2<n\le p_k\#$ for $k>2$ is given by

$$N_k-1+\left(\pi_2\left(p_k\#\right)-\pi_2\left(p_k+2\right)\right)\tag{8}$$

where $\pi_2(x)$ is the twin-prime counting function.


Formula (5) above is based on this question by user buja who claims to have verified it up to $p_{10}\#=29\#=6\,469\,693\,230$, but is asking for a proof.


The Euler totient function defined in formula (2) above is related to the prime number theorem for arithmetic progressions and the Riemann hypothesis.


Question (1): Can the twin-prime conjecture be related to the growth of $N_k$ and/or $\phi_2(n)$ defined in formulas (5) and (6) above?


I believe $\phi_2(n)$ is related to $\phi(n)$ as follows

$$\phi_2(n)=\sum\limits_{d|n} (-1)^{d-1}\ \mu(rad(d))\ \phi\left(\frac{n}{d}\right)\tag{9}$$

where $\mu(n)$ is the Möbius function and $rad(n)$ is the radical of an integer.


I've verified formulas (6) and (9) above are equivalent up to $n=10,000$. I tried expanding the product in formula (6) to a sum, but I can't seem to find a relationship between the terms of the expanded product of formula (6) and the terms of formula (9).


Question (2): Can formula (9) above be proven to be equivalent to formula (6) above?


The remainder of this question provides related information which perhaps provides additional insight.


Assuming formulas (5) and (9) above are correct, $N_k$ can be computed by evaluating formula (9) for $\phi_2(n)$ above at $n=p_k\#$ which is square-free and therefore $rad(d)=d$ for this case. So $N_k$ is related to $E_k$ as follows:

$$N_k=\sum\limits_{d\,|\,p_k\#} (-1)^{d-1}\ \mu(d)\ \phi\left(\frac{p_k\#}{d}\right)=E_k+\sum\limits_{d>1\,\land\,d\,|\,p_k\#} (-1)^{d-1}\ \mu(d)\ \phi\left(\frac{p_k\#}{d}\right)\tag{10}$$


Note that $\mu(rad(n))=(-1)^{\nu(n)}$ where $\nu(n)$ is the number of distinct primes dividing $n$ (see OEIS entry A001221), so formula (9) above can also be evaluated as follows.

$$\phi_2(n)=\sum\limits_{d|n} (-1)^{d-1}\ (-1)^{\nu(d)}\ \phi\left(\frac{n}{d}\right)\tag{11}$$


When evaluated at $n=p_k\#$, formula (11) above can be simplified to

$$N_k=\phi_2(p_k\#)=2 \sum\limits_{d\,\left|\,\frac{p_k\#}{2}\right.} (-1)^{\nu(d)}\ \phi\left(\frac{\frac{p_k\#}{2}}{d}\right)\tag{12}$$

which combines the contributions of odd and even related divisors $d$ and $2 d$ since

$$(-1)^{2 d-1}\ (-1)^{\nu(2 d)}\ \phi\left(\frac{n}{2 d}\right)=(-1)^{d-1}\ (-1)^{\nu(d)}\ \phi\left(\frac{n}{d}\right)\tag{13}$$

when $(n \bmod 4)=2$ which is the case for $n=p_k\#$.


I've verified formulas formulas (5) and (12) above are equivalent up to $p_{20}\#=71\#=557\,940\,830\,126\,698\,960\,967\,415\,390$.


When $k>1$, formula (12) above can be simplified further as follows

$$N_k=\phi_2(p_k\#)=2 \sum\limits_{d\,\left|\,\frac{p_k\#}{6}\right.} (-1)^{\nu(d)}\ \phi\left(\frac{\frac{p_k\#}{6}}{d}\right)\tag{14}$$

where formula (14) above is directly related to operation of the twin-prime sieve.


For example, consider the following table where $k=4$, $p_k=7$, $p_k\#=210$, $m=\frac{pk\#}{6}=35$, $d$ is a divisor of $m$, and $c(k,d)$ in the last column represents the number of times the divisor $d$ appears in a pair of associates when the smallest prime dividing the related associate is greater than $p_k$.

$$\begin{array}{ccc} d & 2 (-1)^{\nu (d)} \phi \left(\frac{m}{d}\right) & (-1)^{\nu (d)} c(k,d) \\ 1 & 48 & \text{-} \\ 5 & -12 & -12 \\ 7 & -8 & -8 \\ 35 & 2 & 2 \\ \end{array}$$

The first row in the Table above removes all primes up to $p_k$ and their multiples equivalent to the sieve of Eratosthenes. What remains is to remove the associates of primes $p_3=5$ up to $p_k$ and their multiples which have no prime divisor $\le p_k$ which is accomplished by the remaining rows in the table. The second row in the table removes the associates of $p_3=5$ and it's multiples which have no prime divisor $\le p_k$. The third row in the table removes the associates of $p_4=7$ and it's multiples which have no prime divisor $\le p_k$. The last row in the table compensates for the fact that two associates were removed twice, once by the divisor $p_3=5$, and a second time by the divisor $p_4=7$.


OEIS entry A298826 seems to imply the twin-prime conjecture is related to the evaluation of the following Dirichlet series at $s=1$.

$$\sum\limits_{n=1}^\infty (-1)^{n+1} \left(\sum\limits_{d|n} (-1)^{\nu(d)}\right) n^{-s}=\left(\frac{2^{1-s}}{2^s-2}+1\right) \zeta(s)^2 \prod\limits_{k=1}^\infty \left(1-2 \left(p_k\right){}^{-s}\right)\tag{15}$$


There are many other Dirichlet series related to the product $f(s)=\prod\limits_{k=1}^\infty \left(1-2 \left(p_k\right){}^{-s}\right)$ appearing on the right side of formula (15) above some of which are defined in my previous question, but I'm not sure if and how any of theses other Dirichlet series are also related to the twin-prime conjecture.

Steven Clark
  • 8,744
  • Quick things I note: (1) A major issue is that these formulas as written work only for $n=p_i#$. (2) The twin prime sieve you notate doesn't seem to count the twin primes, as you're looking at elements left over, which would include non-twin primes so far as I can tell. I find working with the following twin prime sieve a bit easier, because it deals with directly removing residue classes: $$(6k-1,6k+1) \in \mathbb{P}^2 \iff (\forall p \ge 5, p \in \mathbb{P})(k \not \equiv \left[\frac p6 \right] \pmod p)$$ where $[]$ is the nearest-integer function. – Eric Snyder Sep 27 '22 at 21:17
  • (Those are just very quick notes though, I'll need to read through more thoroughly later.) – Eric Snyder Sep 27 '22 at 21:19
  • @EricSnyder The advantage of the sieve described in this question over your twin-prime-sieve is we have formulas for $N_k$ and $\phi_2(n)$. Granted $N_k$ isn't the exact number of twin primes in the interval $p_k+2<n<p_k#$, but $E_k$ isn't the exact number of primes in the interval $p_k<n<p_k#$ either. Yet the prime number theorem for arithmetic progressions and the Riemann hypothesis are still both related to $\phi(n)$, so it seems to me the twin-prime conjecture is perhaps related to $\phi_2(n)$, and note $\phi(n)$ and $\phi_2(n)$ are not necessarily restricted to $n=p_k#$. – Steven Clark Sep 27 '22 at 22:44
  • Good points. Where does the $\phi_2(n)$ function come from? Is it from another reference or something you've created for this? (I'll note I still haven't had time to thoroughly analyze this yet so grain of salt.) – Eric Snyder Sep 28 '22 at 02:29
  • @EricSnyder I defined it here and don't have a reference, but perhaps it's been investigated before. – Steven Clark Sep 28 '22 at 03:26
  • @EricSnyder This answer at https://mathoverflow.net/q/435006 to my related question recently posted on Math Overflow provides some references where the function $\phi_2(n)$ has been studied before. – Steven Clark Nov 20 '22 at 21:22

0 Answers0