Chebyshev Theta Function
Compute θ(n)=Σ(p≤n)ln(p) over primes with compensated addition and an exact prime sieve capped at n=1,000,000.
Description
Chebyshev’s theta function sums the natural logarithms of primes up to an inclusive limit.
Chebyshev’s theta function sums the natural logarithms of primes up to an inclusive limit. Unlike Chebyshev’s psi, higher prime powers add no extra terms.1
The tool returns value. The indexing and output conventions below determine how to read these values.
When to use Chebyshev Theta Function
Use this for the following task: Compute θ(n)=Σ(p≤n)ln(p) over primes with compensated addition and an exact prime sieve capped at n=1,000,000. Use the input and output conventions below to reproduce the intended mathematical quantity.
How to use Chebyshev Theta Function and understand its results
- Choose the required indexes, integers or sequence entries. Preserve decimal-string encodings where the field table specifies strings.
- Enter n according to the field table, then run the tool.
- Read value. Use the stated units, indexing and interpretation of the numerical result.
- Keep exact decimal strings for subsequent integer arithmetic; distinguish them from any explicitly approximate numeric result.
| Input field | Meaning | Value type and bounds | Requirement |
|---|---|---|---|
| n | Nonnegative upper limit (sieve resource limit 1000000) | integer; minimum 0; maximum 1000000 | Required |
Use a sieve to identify primes and add their Math.log values with compensated summation. Limits below two return zero.
θ(n)=Σ[prime p≤n]ln(p) The symbols and boundary conditions refer to the supplied fields and the implementation described above.
| Output field | Meaning | Value type |
|---|---|---|
| value | Chebyshev theta using natural logarithms | number |
{
"input": {
"n": 3
},
"output": {
"value": 1.791759469228055
}
} Limitations and assumptions
The limit is at most one million. The result is a floating-point sum rather than an exact symbolic logarithm or a prime count.
Use the declared integer bounds and string formats. Large exact outputs remain decimal strings; numerical approximations use ordinary floating-point arithmetic. A rejected input is different from a valid zero count or false membership flag.
Alternative or Complementary methods
Choose Chebyshev Psi Function when you need its operation: Compute ψ(n)=Σ(p^k≤n)ln(p) over all positive prime powers with compensated addition and a prime sieve capped at n=1,000,000. Choose Prime Counting by the Sieve of Eratosthenes for the complementary operation: Count primes at most n exactly with the sieve of Eratosthenes, excluding zero and one and limiting n to 1,000,000.
Background reference: Lecture 16: Riemann zeta function and Chebyshev functions.
References
-
Lecture 16: Riemann zeta function and Chebyshev functions — Andrew V. Sutherland, MIT
Similar or alternative tools
- Chebyshev Psi Function
Compute ψ(n)=Σ(p^k≤n)ln(p) over all positive prime powers with compensated addition and a prime sieve capped at n=1,000,000.
- Prime Counting by the Sieve of Eratosthenes
Count primes at most n exactly with the sieve of Eratosthenes, excluding zero and one and limiting n to 1,000,000.