Jordan Totient Calculator

Compute the Jordan totient J(k,n), a power version of Euler's totient, from the prime factors of n.

Math and PercentUpdated 2026-11-182 min read
Jordan Totient Calculator
A whole number from 1 to 1,000,000.
A whole number from 1 to 5.
Jordan totient J(k, n)
...
Euler totient J(1, n)...
Prime factorization...

What it does

The Jordan totients form a family of functions indexed by a positive integer k. At k = 1 the family gives Euler's totient, and higher values of k count ordered k tuples that together with n generate the whole space of residues. The functions are named after Camille Jordan, who introduced them in the nineteenth century.

The formula mirrors the product formula for Euler's totient, with powers inserted. Instead of n times the product of one minus one over p, we use n to the k times the product of one minus one over p to the k. When k is one the extra powers disappear and the familiar totient returns.

This page accepts k from one to five and n up to one million. It factors n, raises n to the chosen power using exact integer arithmetic, and applies one correction per distinct prime. The division at each step is exact because every prime divides n.

The result is shown together with the ordinary totient so you can see how the family grows with k. The factorization is printed as well, since the correction factors depend only on which primes appear, not on their exponents.

All values are exact integers with no rounding. Higher orders produce large numbers quickly, which is one reason the input limit is one million rather than the trillion used for simpler functions.

How to use

  1. Enter an integer n from 1 to 1,000,000.
  2. Enter an order k from 1 to 5.
  3. Read J(k, n) from the main result box.
  4. Compare it with the Euler totient shown beside it.
  5. The defaults n = 8 and k = 2 reproduce the worked example.
  6. Set k = 1 to check that the tool returns the ordinary totient.

Formula

J(k, n) = n^k x product over distinct primes p dividing n of (1 - 1/p^k)
n
The integer whose totient is being computed.
k
The order of the Jordan function, from 1 to 5.
J(k, n)
The Jordan totient of order k at n.

For n = 1 the value is 1 for every k. For a prime power p^a the formula reduces to p^(ak) minus p^((a-1)k), which at k = 1 becomes p^a minus p^(a-1), the ordinary totient of a prime power. The function is multiplicative, so values for coprime factors multiply.

Worked example

Example: J(2, 8)

The page opens with n = 8 and k = 2.

  1. Factor 8 as 2^3. The only distinct prime is 2.
  2. Raise n to the order: 8^2 = 64.
  3. Compute the correction for p = 2: 1 - 1/2^2 = 3/4.
  4. Multiply: 64 x 3/4 = 48.
  5. The tool reports 48 for J(2, 8).
  6. The Euler totient J(1, 8) is 4, shown beside it.
  7. A second check: J(2, 12) = 144 x 3/4 x 8/9 = 96.

Reference table

Jordan totients of order two
nFactorizationJ(2, n)J(1, n)
1none11
42^2122
82^3484
122^2 x 3964
162^41928
302 x 3 x 55768

Limits

  • The order k is limited to 5 to keep results readable.
  • Inputs above one million are rejected.
  • The tool computes the integer value, not a count of residue tuples.
  • Factorization precision limits the upper bound on n.

Common mistakes

  • Raising each prime to k instead of the whole number n.
  • Using exponents in the correction factor when only distinct primes matter.
  • Expecting J(k, n) to divide n for every k.
  • Forgetting that J(1, n) is Euler's totient.
  • Rounding the intermediate fraction instead of dividing exactly.

Try it yourself

Quick checks. Answers sit tucked under each question.

What is J(2, 12)?

12^2 = 144, and the corrections are 3/4 and 8/9, so J(2, 12) = 96.

What is J(1, 12)?

At order one the value is Euler's totient, which is 4.

What is J(2, 8)?

8^2 x 3/4 = 48.

Questions

Who were the Jordan totients named after?

They are named after Camille Jordan, who introduced them as generalizations of Euler's totient.

What happens at k = 1?

The Jordan totient becomes the ordinary Euler totient.

Do prime exponents matter?

They affect the size of n^k, but the correction factor uses each distinct prime only once.

Is the function multiplicative?

Yes. Coprime inputs give values that multiply.

Are the results exact?

Yes. All powers and divisions use integer arithmetic.

What is the largest order?

Order five. Larger orders return a clear error.

Sources

How this page was checked. The formula above was matched against the cited sources, and the worked example was run through the tool on this page before publishing. If you spot an error, contact us so we can fix it and note the correction.