1

Let $\pi(n)$ be the number of primes between $1$ and $n$.

Let $\pi_2(n)$ be the number of prime twins (gap $2$) between $1$ and $n$.

Let $\pi_3(n)$ be the number of prime cousins (gap $4$) between $1$ and $n$.

Let $\pi_4(n)$ be the number of prime constellations with gap $8$ between $1$ and $n$.

And in general let

$\pi_m(n)$ be the number of prime constellations with gap $2^{m-1}$ between $1$ and $n$.

We count $(3,5)$ as $2$ prime twins and $(3,5),(5,7)$ as 4 prime twins and analogue for the others.

Let $\ln_2^{*}(x)$ be the log base $2$ of $x$ rounded down. Let $f(n)$ be defined as

$$ f(n) = \sum_{m = 2}^{\ln_2^{*}(n)} \pi_{m}(n)$$

Can we prove that

$$ f(n) \leq \pi(n) $$

is true for all $n$ ?

Or can we prove that for sufficiently large integer $w$ :

$$ f(w) \leq \ln(2) \pi(w) $$

is true ?

I assume no counterexamples exist to

$$ f(n) \leq \pi(n) $$

But I am uncertain.

mick
  • 17,886

1 Answers1

2

This is not an answer but providing a perhaps useful formula for $\pi_k(n)$.

First, you'll need to pick a definition of $\pi_k(n)$ to work with, otherwise you'll be chasing up blind alleys.

I recommend this most simple one. Note that $0$-separated twin prime averages are just primes themselves, so that $k=1$ separated primes are twins and so on.. This formula generalizes all of the cases! Define $\pi_k(n)$ to be the number of $2k$-separated prime pair averages that lie in the range $[1, n]$.

We have, recursively:

$$ \pi_k(n) = \left(\sum_{d\ \mid\ \sqrt{n+k}\#}\mu(d)\left(\sum_{0 \leq r \lt d, \ \\ r^2 = k^2 \mod d}\left\lfloor \frac{n -r}{d}\right\rfloor\right)\right) + \pi_k(\sqrt{n + k} +k ) -1 $$

I.e. recurse until you reach $\pi_k(\sqrt{n + k} + k) = \pi_k(k) = 0$.

Ask me any questions about it and I can teach you those parts that you do not know about.

Note, this is a generalization of an inclusion-exclusion formula on Wikipedia for $\pi_0(n) \equiv \pi(n)$.


Once you realize this formula, you may try plugging it into your conjectures and seeing what you get.

Why it's a good formula: it involves modular arithmetic, group theory, arithmetic functions, inclusion-exclusion, square-free integers, etc. You only need a few of these things to derive it. You don't need group theory for instance, though the groups are just there hiding. It also avoids use of the CRT (Chinese Remainder Theorem). It actually involves a fairly simple to solve inequality in one of its steps.


Edit:

Derivation of Formula

Throughout, $p, q$ will always be prime numbers.

Lemma 1. A number $x \in \Bbb{Z}$ is a twin prime average if and only if $x \pm 1 \neq 0 \pmod q$ for all $2 \leq q \leq \sqrt{ x+ 1}$. Proof. Sieve of Eratosthenes.

Lemma 2. $ab \neq 0 \mod q \iff a \neq 0 \mod q$ and $b \neq 0 \mod q$. This $\iff$ occurs only by primality of $q$, so if $q$ were composite, it wouldn't hold.

Corollary 1. Lemma 1 can be expressed $x$ is a twin prime average if and only if $(x +1)(x-1) \neq 0 \mod q$ for all $2\leq q \leq \sqrt{x + 1}$.

But $(x + 1)(x-1) = x^2 - 1$ more succinctly. Here, if we were studying $2k$-separated prime averages for $k \neq 1$, then this would read $x^2 - k^2 \neq 0 \mod q$.

Thus, given an interval $[1, b] \subset \Bbb{N}$ and that you'd like to count the number $x \in [1,b]$ such that $x^2 \neq 1 \mod q$ what you can do is take the set size :

$$ \# [1,b] - \#\bigcup_{2\leq q \leq \sqrt{x + 1}} \{x\in [1,b] : x^2 =1\mod q\} $$

Ie. the size of the whole set minus the size of the union of all examples that you don't want to count equals the size that you're interested in.

But what is the size of $\bigcup_{2 \leq q \leq \sqrt{x + 1}} \{x\in [1,b]: x^2 = 1 \mod q\}$?

Here mathematicians usually employ what is called the inclusion exclusion principle.

For example:

$$ \#(A \cup B \cup C) = \# A + \# B + \# C - \# (A\cap B) -\#(A \cap C) - \#(B\cap C) + \#(A\cap B \cap C) $$

for any three sets $A, B, C$.

But, when you take say $X_q =\{ x \in [1,b ] : x^2 = 1 \mod q\}$ and $X_p = \{x \in \[1,b]: x^2 = 1\mod p\}$ and you intersect them, what do you get?

Each $x \in X_p \cap X_q$ is such that $x^2 = 1\pmod q$ and $x^2 = 1 \pmod p$.

Lemma 3. By the Chinese Remainder Theorem we have that $X_{q_1} \cap \dots \cap X_{q_n}$ for prime numbers $q_i$ is equal to $X_{q_1 \cdots q_n}$.

Now, our inclusion-exclusion formula becomes:

$$ \psi(b) = \sum_{d\ \mid\ \sqrt{b + 1}\#} \# X_d(b) $$

where we note that $\#[1,b]$ got absorbed by this notation into summation case for when $d = 1$ and certainly divides $\sqrt{b + 1}\#$, because $\#X_1(b) =$ the set of all $x \in [1,b]$ such that $x^2 = 1 \mod 1$, but everything zeros out modulo $1$, so that equation is true for all $x \in [1,b]$ and therefore $\#X_1(b) = b$.

Now how can we expand or express $\#X_d(b)$? One way is to note that what you're trying to solve is:

$$ 1 \leq x = dz +r \leq b $$ where $0 \leq r \lt d$ and solves $r^2 = 1 \mod d$. These are all the different $x$'s modulo $d$ that make up the count in $\#X_d(b)$.

Since an $x$ can belong to one-and-only-one equivalence class modulo $d$, we have that summation is appropriate, and that $$\#X_d(b) = \sum_{0\leq r \lt d, \\ r^2 = 1 \mod d} \left\lfloor\frac{b - r}{d} \right\rfloor$$

It's like saying yes, there are some $x \in [1, d)$ that solve it but also some in $[d, 2d)$ and son on... So you've got to count "how many copies of $[0,d)$" can we squeeze into $b - r$ and that's $\lfloor\frac{b - r}{d} \rfloor$.

To re-iterate, since $x = dz + r$ solves $1 \leq x \lt b$ and $x^2 = 1 \mod d$, how many more times does $x$ (modulo $d$) occur in the interval $[1,b]$ and that's where there the division-floor expression comes from.

General Formula:

$$ \psi_k(b) = \sum_{d\ \mid\ \sqrt{b + k}\#}\mu(d)\left(\sum_{0 \leq r \lt d, \ \\ r^2 = k^2 \mod d} \left\lfloor\frac{b - r}{d} \right\rfloor\right) $$

But as the formula includes a prime $q \mid \sqrt{b + 1}\#$ , if that is a twin prime average, it gets "cancelled" from the count. Thus we must add in, recursively:

$$ \pi_k(b) = -1 +\pi_k(\sqrt{b + k } + k) +\sum_{d \ \mid \ \sqrt{b + k}\#} \mu(d) \left(\sum_{0\leq r \lt d, \ r^2 = k^2 \mod d } \left\lfloor\frac{b - r}{d}\right\rfloor\right) $$

By Sieve of Eratosthenes, $\psi_k(b)$ will count what we want in the interval $\sqrt{b + k} + k + 1$ to $b$, so what we do is recursively count the rest in the first term of $\pi_k(b)$'s definition.

Where the $-1$ comes from it's a correction from something, but I can't figure out where. It shows up when you're code verifying the formula - everything is off by 1, so I just subtract 1. Also the Wikipedia article has a 1 there. So for it to "align with" that, I must include it. It either is there or it isn't, but to be on the safe side I'll include it.

Anyways, that's how you derive the formula.

Now prove that it is not eventually constant. That's the hard part.

  • 1
    hmm If we use an approximation sieve for prime twins with the analogue of the inclusion-exclusion we get terms like $2^n$ I do not see such terms here, so Im not sure if it is correct. Where did you find that formula ? Can you prove it for prime twins ? Btw I see you like number theory, I have alot of open questions there :) – mick Nov 26 '23 at 20:09
  • 1
    I think you like this question : https://math.stackexchange.com/questions/3048527/improved-sieve-for-primes-and-prime-twins

    and

    https://math.stackexchange.com/questions/3790597/why-does-this-ratio-5-occur-relating-prime-twins-and-sophie-germain-primes

    – mick Nov 26 '23 at 21:36
  • 1
    and probably these too : https://math.stackexchange.com/questions/2941310/about-beta-abn-sum-i-2n-a-omegai-space-omegaib-where and https://math.stackexchange.com/questions/518026/can-the-landau-ramanujan-constant-be-generalized-towards-cubes and https://math.stackexchange.com/questions/901438/is-every-positive-integer-the-sum-of-at-most-8-pentatope-numbers – mick Nov 26 '23 at 21:42
  • @mick I reasoned about what the formula must be. I can show you each step in an edit if you'd like – Daniel Donnelly Nov 27 '23 at 03:38
  • 1
    @mick See edits for derivation – Daniel Donnelly Nov 27 '23 at 04:35
  • 1
    @Donnely : maybe the $-1$ part comes from the numbers $1$ or $2$. $1$ is not a composite nor a prime. Also $(1,3)$ is not a prime twin an neither is $(0,2)$. I suspect it comes from the small numbers, just as it does from the wiki. I also count $(17,19)$ as 2 twin , and you count it as "one pair ". Though that is easily fixed by a factor $2$. If you want to invite me to a chat go ahead. Btw I do not know how to invite ppl to a chat, I can only open a room lol – mick Nov 27 '23 at 12:24
  • 1
    @donnely : I think you might like this sieve or question , what was the motivation of my comment mentioning powers of 2 : https://math.stackexchange.com/questions/4815649/prime-twin-counting-by-pi-2t2-sum-2jt2-2-omegaj-1-2-lf

    Im not sure if that one works , that is the question. Also I was looking for the amount of sieves for twins that exist.

    – mick Nov 27 '23 at 23:29
  • @mick have you proved twin primes yet? – Daniel Donnelly Nov 30 '23 at 03:32
  • 1
    My mentor claims to have a proof actually. I might ask more related questions. – mick Nov 30 '23 at 11:58
  • 1
    @mick do you understand how to derive this formula yet? What ideas have hit you on how to prove its non-vanishing? – Daniel Donnelly Jun 20 '24 at 09:12
  • 1
    Yes I understood how you arrived at your formula. A long time ago already. Although the memory is not fresh lol. The main idea is to sieve by something that sieves away too much, and then show it sieves more than this sieve, or any equivalent sieve. And hence we get a lower bound. The upper bound isnt given by this idea but that has already been put pretty sharp by others. I believe it was Brun who proved $\pi_2(x) < 100 x \ln(x)^{-2}$. offtopic, but the following conjecture is made by my mentor : https://sites.google.com/site/tommy1729/prime-twins-and-prime-constellations-tommys-conjecture – mick Jun 22 '24 at 21:42