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

Description

Jordan’s totient generalizes Euler’s totient to a positive order k.

Jordan’s totient generalizes Euler’s totient to a positive order k. It counts ordered k-tuples of residues jointly coprime with n and has a prime-product formula.1

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

When to use Jordan Totient Function

Use this for the following task: Return J_k(n)=n^k∏(p|n)(1−p^(−k)) exactly for positive order k≤128, with trial division limited to n≤10¹². Use the input and output conventions below to reproduce the intended mathematical quantity.

How to use Jordan Totient 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, order 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
orderPositive Jordan order (resource limit 128)integer; minimum 1; maximum 128Required

Factor n, calculate each prime-power contribution with BigInt and multiply them. Return the exact result as a decimal string; n=1 returns one.

J_k(n)=Π[p^a∥n] p^(k(a−1))×(p^k−1)

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

Output fieldMeaningValue type
valueJordan totient J_k(n)string (integer/arbitrary)
json
{
  "input": {
    "n": 12,
    "order": 2
  },
  "output": {
    "value": "96"
  }
}

Limitations and assumptions

The order lies in 1..128 and n is at most 10¹². The tool returns a count rather than residue tuples.

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 Dedekind Psi Function when you need its operation: Return ψ(n)=n∏(p|n)(1+1/p) exactly using distinct prime factors, with ψ(1)=1 and trial division limited to n≤10¹². Choose Carmichael Lambda Function for the complementary operation: Return the exponent of the multiplicative group modulo n exactly from prime powers and their lcm, with λ(1)=1 and trial division limited to n≤10¹².

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

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

  • Carmichael Lambda Function

    Return the exponent of the multiplicative group modulo n exactly from prime powers and their lcm, with λ(1)=1 and trial division limited to n≤10¹².

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