Intereting Posts

Are all numbers real numbers?
Why is the commutator defined differently for groups and rings?
Multiples of an irrational number forming a dense subset
Proof Check: Every Cauchy Sequence is Bounded
A binary quadratic form and an ideal of an order of a quadratic number field
Factorisations of permutations
What the implicit function theorem is actually showing
Is it possible to generate truly random numbers using a computer?
Does anyone know any resources for Quaternions for truly understanding them?
Is function $f:\mathbb C-\{0\}\rightarrow\mathbb C$ prescribed by $z\rightarrow \large \frac{1}{z}$ by definition discontinuous at $0$?
Inequality $\sum\limits_{cyc}\frac{a^3}{13a^2+5b^2}\geq\frac{a+b+c}{18}$
Probability questions of watch problem
3-regular graphs with no bridges
Is it a good approach to heavily depend on visualization to learn math?
Linear Algebra, eigenvalues and eigenvectors

Again, pondering on twin primes, I came upon the following result. It baffles me a bit, so could someone give more intuitive reasoning why it works.

First, define a function $P_6$ as $$P_6(n)=\begin{cases}

0, \ \ 6n-1 \not\in \mathbb P \wedge 6n+1 \not\in \mathbb P \\

1, \ \ (6n-1 \not\in \mathbb P \wedge 6n+1 \in \mathbb P) \vee (6n-1 \not\in \mathbb P \wedge 6n+1 \in \mathbb P)\\

2, \ \ 6n-1 \in \mathbb P \wedge 6n+1 \in \mathbb P

\end{cases}$$

So $P_6(n)$ has value $0$ if neither of the numbers around $6n$ is a prime, $1$ if either but not both are primes and $2$ is both are.

- Common factors of cyclotomic polynomials and polynomials with prime coefficients
- Prime number theory and primes in a specific interval
- A continued fraction involving prime numbers
- (Easy?) consequence of the Riemann Hypothesis
- Simple explanation and examples of the Miller-Rabin Primality Test
- Convergence of infinite product of prime reciprocals?

Let sets $P_6^0,P_6^1,P_6^2$ be the corresponding sets of indexes where $P_6 = 0,1 \vee 2$, so, for example, $\forall n\in P_6^1, P_6(n) = 1$

Define three new functions using the indicator functions of above sets:

\begin{cases}

\pi_{6\bullet}^0 (n) = \sum_{i=1}^n 1_{P_6^0}(i) \\

\pi_{6\bullet}^1 (n) = \sum_{i=1}^n 1_{P_6^1}(i) \\

\pi_{6\bullet}^2 (n) = \sum_{i=1}^n 1_{P_6^2}(i)

\end{cases}

So these functions tell how many such indexes $1 \leq s \leq n$ there are for whom the number of primes surrounding $6s$ is $i$, $i \in \{0,1,2\}$.

These functions have following relations: \begin{equation} \pi_{6\bullet}^0 (n)+\pi_{6\bullet}^1 (n)+\pi_{6\bullet}^2 (n) = n \ \ \ \ \ (1) \end{equation} and \begin{equation} \pi(6n+1)-2 = \pi_{6\bullet}^1 (n)+2 \pi_{6\bullet}^2 (n) \ \ \ \ \ (2). \end{equation}

Here $\pi(n)$ is the prime counting function and it has argument $6n+1$ because the biggest number we test is indeed $6n+1$ and we have to remove $2$ because the first two primes are not reachable via number six.

Now, from (1) we get \begin{equation} \pi_{6\bullet}^2 (n) = n-\pi_{6\bullet}^0 (n)-\pi_{6\bullet}^1 (n) \ \ \ \ \ (3). \end{equation}

Substituting to (2) we get $$\pi(6n+1) = 2n-2\pi_{6\bullet}^0 (n)-\pi_{6\bullet}^1 (n)+2.$$

This works. For example $\pi_{6\bullet}^0 (5000) = 2223,$ and $\pi_{6\bullet}^1 (5000) = 2311$, and $10000-2*2223-2311+2 =3245 = \pi(30001).$

Can someone offer a bit more intuition on how this works? The $(2\pi_{6\bullet}^0 (n)+\pi_{6\bullet}^1 (n))$ is the number of numbers of the form $6k-1 \vee 6k+1$ between 5 and $6n+1$ which are not prime and when this is subtracted from $2n$ we get number of primes between 5 and $6n+1$. How?

- Distribution of Subsets of Primes
- Proving ${p-1 \choose k}\equiv (-1)^{k}\pmod{p}: p \in \mathbb{P}$
- Prove or disprove: $99^{100}+100^{101}+101^{99}+1$ is a prime number
- Is there any result, that says that $\lfloor e^{n} \rfloor$ is never a prime for $n>2$?
- Unusual pattern in the distribution of odd primes
- Primality of $n! +1$
- If $n$ is a positive integer, does $n^3-1$ always have a prime factor that's 1 more than a multiple of 3?
- Conjectured compositeness tests for $N=b^n \pm b \pm 1$
- Primes dividing a polynomial
- Trying to understand why a set of residues modulo a primorial $p_k\#$ has a range of values smaller than $2p_{k+1}$

An integer has a chance of being prime if it is not divisible by 2 or 3. Call such a number a potential primes. The number of potential primes between 5 and $6n+1$ (again, that means integers not divisible by 2 or 3) is $2n-2$, because numbers not divisible by 2 or 3 occur in pairs $(6k-1, 6k+1)$ around the multiples of 6.

To get the actual number of primes, we have to subtract from $2n$ the number of these potential primes that are not prime. For each $k \le n$, see if the two neighbors of $6k$ are primes, and if not, subtract from $2n$ accordingly. If neither $6k-1$ nor $6k+1$ is prime, subtract 2 to account for the two non-primes. If exactly one neighbor of $6k$ is prime, we subtract 1. We can subtract all the 2’s at once by subtracting $2\pi_{6\bullet}^0 (n)$, and we can subtract all the 1’s at once by subtracting $\pi_{6\bullet}^1 (n)$. This gives the number of primes between 5 and $6n+1$. Taking into account the primes 2 and 3, the result is the formula you wanted an explanation for, $$\pi(6n+1) = 2n-2\pi_{6\bullet}^0 (n)-\pi_{6\bullet}^1 (n)+2\textrm{.}$$

- Transforming solvable equations to the de Moivre analogues
- Normal operators in Hilbert spaces
- Introductory texts on manifolds
- How many cycles, $C_{4}$, does the graph $Q_{n}$ contain?
- Evaluating the limit $\lim_{n\to\infty} \left$
- Cardinality of a vector space versus the cardinality of its basis
- Embedding of a field extension to another
- Which sequences converge in a cofinite topology and what is their limit?
- Field axioms: Why do we have $ 1 \neq 0$?
- Are the weak* and the sequential weak* closures the same?
- Counting $k$-ary labelled trees
- How find series $\sum_{n=1}^{\infty}\dfrac{(-1)^{{n}]}}{n^a}$
- Greatest common divisor of two relatively primes
- a conjectured continued fraction for $\displaystyle\tan\left(\frac{z\pi}{4z+2n}\right)$
- How do I prove the following result in number theory?