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¹².

Description

The von Mangoldt function singles out prime powers and returns the natural logarithm of their base prime.

The von Mangoldt function singles out prime powers and returns the natural logarithm of their base prime. Integers with multiple distinct prime factors contribute zero.1

The tool returns value. The indexing and output conventions below determine how to read these values.

When to use Von Mangoldt Lambda Function

Use this for the following task: Return Λ(n)=ln(p) when n is a positive power of a prime p, and zero otherwise, with trial division limited to n≤10¹². Use the input and output conventions below to reproduce the intended mathematical quantity.

How to use Von Mangoldt Lambda 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
nPositive integer (trial-division resource limit 10^12)integer; minimum 1; maximum 1000000000000Required

Factor n and return Math.log of the prime only when exactly one distinct prime factor is present. One returns zero.

Λ(n)=ln(p) if n=p^a with a≥1; otherwise 0

The symbols and boundary conditions refer to the supplied fields and the implementation described above.

Output fieldMeaningValue type
valueVon Mangoldt value (natural logarithm)number
json
{
  "input": {
    "n": 8
  },
  "output": {
    "value": 0.6931471805599453
  }
}

Limitations and assumptions

The input is at most 10¹² and the logarithm is a floating-point value. This is one function value rather than the summatory Chebyshev ψ function.

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 Chebyshev Theta Function for the complementary operation: Compute θ(n)=Σ(p≤n)ln(p) over primes with compensated addition and an exact prime sieve capped at n=1,000,000.

Background reference: Digital Library of Mathematical Functions, §27.2.

References

  1. Digital Library of Mathematical Functions, §27.2 — National Institute of Standards and Technology

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.

  • 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.

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