For positive integers , Jordan's totient function counts tuples of residue classes modulo for which . The coordinates together must avoid a common prime divisor of ; they need not each be units.
For each prime factor of , exactly tuples have all coordinates divisible by . The inclusion-exclusion principle, applied to simultaneous divisibility by the distinct prime factors, therefore givesIn particular is Euler's totient function. For , the formula gives . The pair is counted because , even though neither coordinate is coprime to six.