# Chebyshev function

In mathematics, the Chebyshev function is either a scalarising function (Tchebycheff function) or one of two related functions. The first Chebyshev function ϑ (x) or θ (x) is given by
    $\vartheta (x)=\sum _{p\leq x}\log p$
where $\log$ denotes the natural logarithm, with the sum extending over all prime numbers p that are less than or equal to x.
The second Chebyshev function ψ (x) is defined similarly, with the sum extending over all prime powers not exceeding x
    $\psi (x)=\sum _{k\in \mathbb {N} }\sum _{p^{k}\leq x}\log p=\sum _{n\leq x}\Lambda (n)=\sum _{p\leq x}\left\lfloor \log _{p}x\right\rfloor \log p,$
where Λ is the von Mangoldt function. The Chebyshev functions, especially the second one ψ (x), are often used in proofs related to prime numbers, because it is typically simpler to work with them than with the prime-counting function, π (x) (see the exact formula below.) Both Chebyshev functions are asymptotic to x, a statement equivalent to the prime number theorem.
Tchebycheff function, Chebyshev utility function, or weighted Tchebycheff scalarizing function is used when one has several functions to be minimized and one wants to "scalarize" them to a single function:
    $f_{Tchb}(x,w)=\max _{i}w_{i}f_{i}(x).$
By minimizing this function for different values of $w$, one obtains every point on a Pareto front, even in the nonconvex parts. Often the functions to be minimized are not $f_{i}$ but $|f_{i}-z_{i}^{*}|$ for some scalars $z_{i}^{*}$. Then $f_{Tchb}(x,w)=\max _{i}w_{i}|f_{i}(x)-z_{i}^{*}|.$
All three functions are named in honour of Pafnuty Chebyshev.

## Relationships

The second Chebyshev function can be seen to be related to the first by writing it as
    $\psi (x)=\sum _{p\leq x}k\log p$
where k is the unique integer such that p$^k$ ≤ x and x < p$^{k+1}$. The values of k are given in OEIS: A206722. A more direct relationship is given by
    $\psi (x)=\sum _{n=1}^{\infty }\vartheta {\bigx^{\frac {1}{n}}{\big )}.$
This last sum has only a finite number of non-vanishing terms, as
    $\vartheta {\bigx^{\frac {1}{n}}{\big )}=0\quad {\text{for}}\quad n>\log _{2}x={\frac {\log x}{\log 2}}.$
The second Chebyshev function is the logarithm of the least common multiple of the integers from 1 to n.
    $\operatorname {lcm} (1,2,\dots ,n)=e^{\psi (n)}.$
Values of lcm(1, 2, ..., n) for the integer variable n are given at OEIS: A003418.

## Relationships between ψ(x)/x and ϑ(x)/x

The following theorem relates the two quotients ${\frac {\psi (x)}{x}}$ and ${\frac {\vartheta (x)}{x}}$ .
Theorem: For $x>0$, we have
    $0\leq {\frac {\psi (x)}{x}}-{\frac {\vartheta (x)}{x}}\leq {\frac {(\log x)^{2}}{2{\sqrt {x}}\log 2}}.$
This inequality implies that
    $\lim _{x\to \infty }\!\left({\frac {\psi (x)}{x}}-{\frac {\vartheta (x)}{x}}\right)\!=0.$
In other words, if one of the $\psi (x)/x$ or $\vartheta (x)/x$ tends to a limit then so does the other, and the two limits are equal.
Proof: Since $\psi (x)=\sum _{n\leq \log _{2}x}\vartheta (x^{1/n})$, we find that
    $0\leq \psi (x)-\vartheta (x)=\sum _{2\leq n\leq \log _{2}x}\vartheta (x^{1/n}).$
But from the definition of $\vartheta (x)$ we have the trivial inequality
    $\vartheta (x)\leq \sum _{p\leq x}\log x\leq x\log x$
so
    ${\begin{aligned}0\leq \psi (x)-\vartheta (x)&\leq \sum _{2\leq n\leq \log _{2}x}x^{1/n}\log(x^{1/n})\\&\leq (\log _{2}x){\sqrt {x}}\log {\sqrt {x}}\\&={\frac {\log x}{\log 2}}{\frac {\sqrt {x}}{2}}\log x\\&={\frac {{\sqrt {x}}\,(\log x)^{2}}{2\log 2}}.\end{aligned}}$
Lastly, divide by $x$ to obtain the inequality in the theorem.

## Asymptotics and bounds

The following bounds are known for the Chebyshev functions: (in these formulas p$_k$ is the kth prime number; p$_1$ = 2, p$_2$ = 3, etc.)
    ${\begin{aligned}\vartheta (p_{k})&\geq k\left(\log k+\log \log k-1+{\frac {\log \log k-2.050735}{\log k}}\right)&&{\text{for }}k\geq 10^{11},\\[8px]\vartheta (p_{k})&\leq k\left(\log k+\log \log k-1+{\frac {\log \log k-2}{\log k}}\right)&&{\text{for }}k\geq 198,\\[8px]|\vartheta (x)-x|&\leq 0.006788\,{\frac {x}{\log x}}&&{\text{for }}x\geq 10\,544\,111,\\[8px]|\psi (x)-x|&\leq 0.006409\,{\frac {x}{\log x}}&&{\text{for }}x\geq e^{22},\\[8px]0.9999{\sqrt {x}}&<\psi (x)-\vartheta (x)<1.00007{\sqrt {x}}+1.78{\sqrt[{3}]{x}}&&{\text{for }}x\geq 121.\end{aligned}}$
Furthermore, under the Riemann hypothesis,
    ${\begin{aligned}|\vartheta (x)-x|&=O{\Bigx^{{\frac {1}{2}}+\varepsilon }{\Big )}\\|\psi (x)-x|&=O{\Bigx^{{\frac {1}{2}}+\varepsilon }{\Big )}\end{aligned}}$
for any ε > 0.
Upper bounds exist for both ϑ (x) and ψ (x) such that
    ${\begin{aligned}\vartheta (x)&<1.000028x\\\psi (x)&<1.03883x\end{aligned}}$
for any x > 0.
An explanation of the constant 1.03883 is given at OEIS: A206431.

## The exact formula

In 1895, Hans Carl Friedrich von Mangoldt proved an explicit expression for ψ (x) as a sum over the nontrivial zeros of the Riemann zeta function:
    $\psi _{0}(x)=x-\sum _{\rho }{\frac {x^{\rho }}{\rho }}-{\frac {\zeta '(0)}{\zeta (0)}}-{\tfrac {1}{2}}\log(1-x^{-2}).$
(The numerical value of ⁠ζ′ (0)/ζ (0)⁠ is log(2π).) Here ρ runs over the nontrivial zeros of the zeta function, and ψ$_0$ is the same as ψ, except that at its jump discontinuities (the prime powers) it takes the value halfway between the values to the left and the right:
    $\psi _{0}(x)={\frac {1}{2}}\!\left(\sum _{n\leq x}\Lambda (n)+\sum _{n<x}\Lambda (n)\right)={\begin{cases}\psi (x)-{\tfrac {1}{2}}\Lambda (x)&x=2,3,4,5,7,8,9,11,13,16,\dots \\[5px]\psi (x)&{\mbox{otherwise.}}\end{cases}}$
From the Taylor series for the logarithm, the last term in the explicit formula can be understood as a summation of ⁠x$^ω$/ω⁠ over the trivial zeros of the zeta function, ω = −2, −4, −6, ..., i.e.
    $\sum _{k=1}^{\infty }{\frac {x^{-2k}}{-2k}}={\tfrac {1}{2}}\log \left(1-x^{-2}\right).$
Similarly, the first term, x = ⁠x$^1$/1⁠, corresponds to the simple pole of the zeta function at 1. It being a pole rather than a zero accounts for the opposite sign of the term.

## Properties

A theorem due to Erhard Schmidt states that, for some explicit positive constant K, there are infinitely many natural numbers x such that
    $\psi (x)-x<-K{\sqrt {x}}$
and infinitely many natural numbers x such that
    $\psi (x)-x>K{\sqrt {x}}.$
In little-o notation, one may write the above as
    $\psi (x)-x\neq o\left({\sqrt {x}}\,\right).$
Hardy and Littlewood prove the stronger result, that
    $\psi (x)-x\neq o\left({\sqrt {x}}\,\log \log \log x\right).$

## Relation to primorials

The first Chebyshev function is the logarithm of the primorial of x, denoted x #:
    $\vartheta (x)=\sum _{p\leq x}\log p=\log \prod _{p\leq x}p=\log \left(x\#\right).$
This proves that the primorial x # is asymptotically equal to e$^{(1+o(1))x}$, where "o" is the little-o notation (see big O notation) and together with the prime number theorem establishes the asymptotic behavior of p$_n$ #.

## Relation to the prime-counting function

The Chebyshev function can be related to the prime-counting function as follows. Define
    $\Pi (x)=\sum _{n\leq x}{\frac {\Lambda (n)}{\log n}}.$
Then
    $\Pi (x)=\sum _{n\leq x}\Lambda (n)\int _{n}^{x}{\frac {dt}{t\log ^{2}t}}+{\frac {1}{\log x}}\sum _{n\leq x}\Lambda (n)=\int _{2}^{x}{\frac {\psi (t)\,dt}{t\log ^{2}t}}+{\frac {\psi (x)}{\log x}}.$
The transition from Π to the prime-counting function, π, is made through the equation
    $\Pi (x)=\pi (x)+{\tfrac {1}{2}}\pi \left({\sqrt {x}}\,\right)+{\tfrac {1}{3}}\pi \left({\sqrt[{3}]{x}}\,\right)+\cdots$
Certainly π (x) ≤ x, so for the sake of approximation, this last relation can be recast in the form
    $\pi (x)=\Pi (x)+O\left({\sqrt {x}}\,\right).$

## The Riemann hypothesis

The Riemann hypothesis states that all nontrivial zeros of the zeta function have real part ⁠1/2⁠. In this case, |x$^ρ$| = √x, and it can be shown that
    $\sum _{\rho }{\frac {x^{\rho }}{\rho }}=O\!\left({\sqrt {x}}\,\log ^{2}x\right).$
By the above, this implies
    $\pi (x)=\operatorname {li} (x)+O\!\left({\sqrt {x}}\,\log x\right).$

## Smoothing function

The smoothing function is defined as
    $\psi _{1}(x)=\int _{0}^{x}\psi (t)\,dt.$
Obviously $\psi _{1}(x)\sim {\frac {x^{2}}{2}}.$