# Prime numbers

## Definitions

Symbol: PP $\mathbb{P}$ Prime numbers
Symbol: PrimeNumber $p_{n}$ nth prime number
Symbol: PrimePi $\pi(x)$ Prime counting function
Symbol: RiemannHypothesis $\operatorname{RH}$ Riemann hypothesis

## Connection formulas

$\mathbb{P} = \left\{ p_{n} : n \in \mathbb{Z}_{\ge 1} \right\}$
$\pi(x) = \# \left\{ p : p \in \mathbb{P} \;\mathbin{\operatorname{and}}\; p \le x \right\}$
$p_{n} = \text{A000040}\!\left(n\right)$
$\pi(n) = \text{A000720}\!\left(n\right)$

## Tables

Table of $p_{n}$ for $1 \le n \le 200$
Table of $p_{{10}^{n}}$ for $0 \le n \le 24$
Table of $\pi\!\left({10}^{n}\right)$ for $0 \le n \le 27$

## Bounds and inequalities

### Bertrand's postulate

$p_{n + 1} < 2 p_{n}$
$\pi\!\left(2 x\right) - \pi(x) \ge 1$

### Bounds for prime numbers

$p_{n} < n \log\!\left(n \log(n)\right)$
$p_{n} > n \left(\log\!\left(n \log(n)\right) - 1\right)$
$p_{n} < n \left(\log(n) + \log\!\left(\log(n)\right) - 1 + \frac{\log\!\left(\log(n)\right) - 2}{\log(n)} - \frac{\log^{2}\!\left(\log(n)\right) - 6 \log\!\left(\log(n)\right) + 10.667}{2 \log^{2}\!\left(n\right)}\right)$
$p_{n} > n \left(\log(n) + \log\!\left(\log(n)\right) - 1 + \frac{\log\!\left(\log(n)\right) - 2}{\log(n)} - \frac{\log^{2}\!\left(\log(n)\right) - 6 \log\!\left(\log(n)\right) + 11.508}{2 \log^{2}\!\left(n\right)}\right)$

### Bounds for the prime counting function

$\pi(x) < \frac{1.25506 x}{\log(x)}$
$\left|\pi(x) - \operatorname{li}(x)\right| < \frac{\sqrt{x} \log(x)}{8 \pi}$
$\pi(x) > \frac{x}{\log(x)}$

Copyright (C) Fredrik Johansson and contributors. Fungrim is provided under the MIT license. The source code is on GitHub.

2020-04-08 16:14:44.404316 UTC