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.
Description
Chebyshev’s psi function sums the natural logarithm of a prime once for each of its positive powers within the limit.
Chebyshev’s psi function sums the natural logarithm of a prime once for each of its positive powers within the limit. It is the summatory von Mangoldt function.1
The tool returns value. The indexing and output conventions below determine how to read these values.
When to use Chebyshev Psi Function
Use this for the following task: 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. Use the input and output conventions below to reproduce the intended mathematical quantity.
How to use Chebyshev Psi 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 |
Sieve primes through n, traverse each prime’s bounded powers and add its logarithm with compensated summation. Stop power multiplication before exceeding the limit.
ψ(n)=Σ[p^k≤n]ln(p), k≥1 The symbols and boundary conditions refer to the supplied fields and the implementation described above.
| Output field | Meaning | Value type |
|---|---|---|
| value | Chebyshev psi using natural logarithms | number |
{
"input": {
"n": 4
},
"output": {
"value": 2.484906649788
}
} Limitations and assumptions
The limit is at most one million. The result is floating point, and includes prime powers rather than just distinct primes or Dedekind’s psi.
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 Theta Function when you need its operation: Compute θ(n)=Σ(p≤n)ln(p) over primes with compensated addition and an exact prime sieve capped at n=1,000,000. Choose Von Mangoldt Lambda Function for the complementary operation: Return Λ(n)=ln(p) when n is a positive power of a prime p, and zero otherwise, with trial division limited to n≤10¹².
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 Theta Function
Compute θ(n)=Σ(p≤n)ln(p) over primes with compensated addition and an exact prime sieve capped at n=1,000,000.
- Von Mangoldt Lambda Function
Return Λ(n)=ln(p) when n is a positive power of a prime p, and zero otherwise, with trial division limited to n≤10¹².