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
- Choose the required indexes, integers or sequence entries. Preserve decimal-string encodings where the field table specifies strings.
- Enter n, order according to the field table, then run the tool.
- Read value. Preserve exact decimal strings and the stated indexing or coefficient order.
- 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 | Positive integer (trial-division resource limit 10^12) | integer; minimum 1; maximum 1000000000000 | Required |
| order | Positive Jordan order (resource limit 128) | integer; minimum 1; maximum 128 | Required |
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 field | Meaning | Value type |
|---|---|---|
| value | Jordan totient J_k(n) | string (integer/arbitrary) |
{
"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
-
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¹².