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

  1. Choose the required indexes, integers or sequence entries. Preserve decimal-string encodings where the field table specifies strings.
  2. Enter n according to the field table, then run the tool.
  3. Read value. Use the stated units, indexing and interpretation of the numerical result.
  4. Keep exact decimal strings for subsequent integer arithmetic; distinguish them from any explicitly approximate numeric result.
Input fieldMeaningValue type and boundsRequirement
nNonnegative upper limit (sieve resource limit 1000000)integer; minimum 0; maximum 1000000Required

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 fieldMeaningValue type
valueChebyshev theta using natural logarithmsnumber
json
{
  "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

  1. Lecture 16: Riemann zeta function and Chebyshev functions — Andrew V. Sutherland, MIT

Similar or alternative tools

Don't forget to set a bookmark for tool.io!
Privacy | Imprint | Cookies