Dedekind Psi Function

Return ψ(n)=n∏(p|n)(1+1/p) exactly using distinct prime factors, with ψ(1)=1 and trial division limited to n≤10¹².

Description

Dedekind’s psi function weights an integer by one plus the reciprocal of each distinct prime divisor.

Dedekind’s psi function weights an integer by one plus the reciprocal of each distinct prime divisor. Factor exponents affect the integer part, but each distinct prime contributes one multiplier.1

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

When to use Dedekind Psi Function

Use this for the following task: Return ψ(n)=n∏(p|n)(1+1/p) exactly using distinct prime factors, with ψ(1)=1 and trial division limited to n≤10¹². Use the input and output conventions below to reproduce the intended mathematical quantity.

How to use Dedekind Psi 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. Preserve exact decimal strings and the stated indexing or coefficient order.
  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 multiply p^(a−1)(p+1) for every prime power using BigInt. Return a decimal string, with ψ(1)=1.

ψ(n)=n×Π[p|n](1+1/p)

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

Output fieldMeaningValue type
valueDedekind psi valuestring (integer/arbitrary)
json
{
  "input": {
    "n": 12
  },
  "output": {
    "value": "24"
  }
}

Limitations and assumptions

The input is capped at 10¹². This arithmetic Dedekind function is distinct from Chebyshev’s summatory function also denoted ψ.

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 Jordan Totient Function when you need its operation: Return J_k(n)=n^k∏(p|n)(1−p^(−k)) exactly for positive order k≤128, with trial division limited to n≤10¹². Choose Chebyshev Psi Function for the complementary 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.

Background reference: OEIS A001615.

References

  1. OEIS A001615 — OEIS Foundation

Similar or alternative tools

  • Jordan Totient Function

    Return J_k(n)=n^k∏(p|n)(1−p^(−k)) exactly for positive order k≤128, with trial division limited to n≤10¹².

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

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