Jordan Totient Calculator
Totient
- Take the prime factorization of 10: the distinct primes are 2 x 5.
- Jordan's totient is the product J_k(n) = n^k x prod (1 - 1 / p^k) over those distinct primes — here n^k = 100.
- Evaluating the product gives J_2(10) = 72: the count of k-tuples of integers up to 10 whose components are jointly coprime to n.
- The divisor-sum identity confirms it: summing J_k(d) over every divisor d of n returns exactly n^k = 100.
The Jordan totient calculator computes J_k(n), defined as n^k times the product of (1 - 1 / p^k) over the distinct prime factors of n. This value counts the k-tuples of integers up to n that are jointly coprime to n. Enter n and k, and the calculator returns J_k(n) together with J_1(n), which is Euler's totient phi(n). For example, J_1(10) = 4, so the calculator reports 4 alongside every J_k value it produces. It also handles larger cases: J_2(10) = 72, since 100 x (1 - 1/4) x (1 - 1/25) = 72; J_2(12) = 96; and J_3(4) = 56.
The method behind the result is the standard definition of the Jordan totient itself: factor n into distinct primes, then apply the product formula exactly as stated. That is why the calculator's output matches the accepted mathematical definition rather than an approximation. The divisor-sum identity offers a further check on the same values: the sum of J_k(d) over all divisors d of n equals n^k exactly, and for n = 12 and k = 2 the divisors' values sum to 144. This page shows the formula, step-by-step workings, worked examples and sources so you can follow each calculation from start to finish.
Worked examples
J_2(10)
(10 · 2)
| J_2(10) — Jordan's totient | 72 |
| J_1(10) = Euler's totient phi(n) | 4 |
| n^k | 100 |
| divisor-sum check: sum of J_k(d) over d | n | 100 |
J_2(12)
(12 · 2)
| J_2(12) — Jordan's totient | 96 |
| J_1(12) = Euler's totient phi(n) | 4 |
| n^k | 144 |
| divisor-sum check: sum of J_k(d) over d | n | 144 |
J_3(4)
(4 · 3)
| J_3(4) — Jordan's totient | 56 |
| J_1(4) = Euler's totient phi(n) | 2 |
| n^k | 64 |
| divisor-sum check: sum of J_k(d) over d | n | 64 |
What is Jordan's totient function?
Jordan's totient, written J_k(n), is the k-dimensional generalization of Euler's totient. Where Euler's function counts single integers below n that share no factor with n, Jordan's totient counts k-tuples of integers up to n that are jointly coprime to n — that is, tuples for which no prime dividing n divides all k entries at once. The function is computed with a product formula over the distinct prime factors of n: J_k(n) = n^k × the product of (1 - 1/p^k), taken over each distinct prime p that divides n.
The simplest case is k = 1. Then J_1(n) is exactly Euler's totient phi(n). For example, J_1(10) = 4, and the calculator reports this Euler value alongside every J_k value it produces, so you can always check the one-dimensional case against the familiar phi function.
Higher values of k extend the count to tuples. Take J_2(10) = 72. The prime factors of 10 are 2 and 5, so the product formula gives 100 × (1 - 1/4) × (1 - 1/25) = 72. Two more examples show how the numbers behave: J_2(12) = 96 and J_3(4) = 56. Each result counts the ordered k-tuples up to n whose entries are jointly coprime to n.
Jordan's totient also satisfies a divisor-sum identity: if you add up J_k(d) over every divisor d of n, the total equals n^k exactly. For n = 12 and k = 2, the values at the divisors sum to 144, which is 12 squared. This identity is a useful cross-check on any single value, and it mirrors the well-known relation between Euler's totient and the sum of its divisor values when k = 1.
How J_k(n) is calculated
Calculating a Jordan totient value starts with the prime factorization of n. Write n as a product of powers of distinct primes, then set aside the exponents: the formula n^k × prod (1 − 1/p^k) runs over the distinct prime factors only, each prime appearing once no matter how many times it divides n. That single rule is the heart of how the Jordan totient is calculated, and it keeps the arithmetic honest when n has repeated factors.
The formula itself is J_k(n) = n^k × prod (1 − 1/p^k) over the distinct prime factors of n. It counts the k-tuples of integers up to n that are jointly coprime to n. To evaluate it, raise n to the power k, then multiply by one factor of the form (1 − 1/p^k) for each distinct prime p dividing n. Because only distinct primes enter, the number of factors equals the number of different primes in the factorization, not the total count of prime factors with multiplicity.
Working J_2(10) in full shows the steps. The factorization is 10 = 2 × 5, so the distinct primes are 2 and 5. With k = 2, n^k is 10^2 = 100. The prime factors give (1 − 1/2^2) = (1 − 1/4) and (1 − 1/5^2) = (1 − 1/25). Multiplying, 100 × (1 − 1/4) × (1 − 1/25) = 72, so J_2(10) = 72. The same procedure handles other inputs: J_2(12) = 96, where 12 = 2^2 × 3 contributes only the primes 2 and 3, and J_3(4) = 56, where 4 = 2^2 contributes the single prime 2.
A useful check comes from the divisor-sum identity: the sum of J_k(d) over all divisors d of n equals n^k exactly. For n = 12 and k = 2, the divisors' values sum to 144, matching 12^2. If your computed values do not add up this way, a prime was likely counted twice or a distinct prime was missed. The k = 1 case is Euler's totient phi(n): J_1(10) = 4, and the calculator reports this value alongside every J_k result so you can compare the two side by side.
- Factor n into powers of distinct primes; keep each prime once, ignoring exponents.
- Compute n^k, then multiply by (1 − 1/p^k) for every distinct prime p.
- Example: J_2(10) = 100 × (1 − 1/4) × (1 − 1/25) = 72.
- Check with the divisor-sum identity: the J_k(d) over all divisors d of n sum to n^k (for n = 12, k = 2, they sum to 144).
Worked values
A worked value shows what a Jordan totient result looks like before you rely on the calculator for larger inputs. Each row below uses only the definition: raise n to the power k, then multiply by (1 - 1/p^k) for every distinct prime factor p of n. The table collects the cases the calculator reports directly, including one case with k = 1 so you can see how the general Jordan totient reduces to the familiar Euler totient.
Start with J_2(10). The distinct prime factors of 10 are 2 and 5, so the product runs over those two primes only. The calculation is 100 x (1 - 1/4) x (1 - 1/25) = 72. Notice that 100 is 10^2, and the two factors remove the pairs that share a factor of 2 or a factor of 5 with 10. The result, 72, counts the 2-tuples of integers up to 10 that are jointly coprime to 10.
The next two rows show the same formula with different inputs. For J_2(12), the answer is 96, and for J_3(4), the answer is 56. In the second case the exponent changes, so the factor for the single prime 2 becomes 1 - 1/8 rather than 1 - 1/4; the structure of the calculation is otherwise unchanged. Comparing rows side by side makes clear that both n and k affect the result, and that the prime factorization of n determines how many factors appear in the product.
The final row is the check that ties the general case to the special one. J_1(n) is Euler's totient phi(n), so J_1(10) = 4. The calculator reports this phi value alongside every J_k value it produces, which gives you a quick way to confirm that a k = 1 entry behaves as expected. If you request a higher power, the phi figure still appears next to it for comparison.
One more consistency check comes from the divisor-sum identity: the sum of J_k(d) over all divisors d of n equals n^k exactly. For n = 12 and k = 2, the divisors' values sum to 144, which matches 12^2. You can use this identity as a sanity check on any worked value in the table, since the individual terms must add up to n^k with no rounding.
| Case | Result | Note |
|---|---|---|
| J_2(10) | 72 | 100 x (1 - 1/4) x (1 - 1/25) = 72 |
| J_2(12) | 96 | Same formula, different input |
| J_3(4) | 56 | Exponent k = 3 |
| J_1(10) | 4 | k = 1 reduces to Euler's totient phi(10) |
The divisor-sum identity
The divisor-sum identity is one of the cleanest statements about the Jordan totient. It says that if you take every divisor d of a positive integer n, compute J_k(d) for each one, and add those values together, the total is exactly n^k. Not approximately, not after rounding — exactly. This gives you a second, independent way to think about J_k: instead of counting k-tuples directly, you can build n^k by stacking the totient values of its divisors.
The reason the identity holds comes from how J_k behaves on shared factors. J_k is multiplicative, meaning that whenever two numbers share no prime factor, J_k of their product equals the product of their J_k values. Because of this, the sum over divisors can be broken apart prime by prime, and each prime's contribution collapses to exactly the power of that prime in n. Multiply those contributions back together and you recover n^k. The multiplicativity is what makes the identity work, and it is also what makes the totient practical to compute from a factorization.
The best way to trust the identity is to check it by hand. Take n = 12 and k = 2. The divisors of 12 are 1, 2, 3, 4, 6, and 12, and for each we need J_2. The brief gives one of these directly: J_2(12) = 96. Applying the definition to the others and summing the six values gives 144, which is exactly 12^2. The identity holds for this case, and the arithmetic lines up with no remainder left over.
You can also see the definition at work on a smaller number. J_2(10) = 72, since 100 × (1 − 1/4) × (1 − 1/25) = 72. The same formula, applied to every divisor of 12, produces the values that add to 144. And when k = 1, J_1 is simply Euler's totient phi: J_1(10) = 4, a figure the calculator shows alongside every J_k value so you can compare the general case with the familiar one.
For a general audience, the practical takeaway is that the Jordan totient is consistent in two directions. You can compute J_k(n) from the distinct prime factors of n, and you can verify your result by summing J_k over the divisors and checking that the total matches n^k. If the two disagree, something in the factorization or the arithmetic has gone wrong.
- Divisors of 12: 1, 2, 3, 4, 6, 12.
- Sum of J_2(d) over those divisors = 144 = 12^2.
- J_2(12) = 96 on its own, one term in that sum.
- J_2(10) = 72, from 100 × (1 − 1/4) × (1 − 1/25).
- J_1(10) = 4, Euler's totient, shown with every J_k value.
FAQs
What is J_2(10)?
J_2(10) is 72. That means there are 72 pairs of integers up to 10 that are jointly coprime to 10. In other words, if you count ordered pairs (a, b) where both a and b are at most 10 and together share no prime factor with 10, the total comes to exactly 72.
How is Jordan's totient related to Euler's totient?
Jordan's totient generalizes Euler's totient. When k equals 1, J_1(n) is exactly Euler's totient phi(n), which counts integers up to n that are coprime to n. Jordan's function extends this idea to k-tuples, counting groups of k integers that are jointly coprime to n rather than single integers.
What is the formula for J_k(n)?
The formula is J_k(n) = n^k times the product of (1 - 1/p^k) over the distinct prime factors p of n. You raise n to the power k, then multiply by one minus one over p to the k for each distinct prime that divides n. Distinct primes are counted once each.
What does the divisor-sum identity say?
The divisor-sum identity says that summing J_k(d) over every divisor d of n gives exactly n^k. For example, with n = 12 and k = 2, adding J_2(d) across all divisors of 12 returns 144, which equals 12 squared. This identity is a useful way to check your results.
What is J_3(4)?
J_3(4) is 56. It comes from 64 times (1 - 1/8). Since 4 has only the distinct prime factor 2, you take 4 cubed, which is 64, and multiply by one minus one over 2 cubed, that is 1 - 1/8. The result is 56.
What is J_2(12)?
J_2(12) is 96. As a check, the divisor-sum identity for n = 12 and k = 2 returns 144, which matches 12 squared. So summing J_2(d) over all divisors of 12 gives 144, confirming the value of 96 for J_2(12) itself.