Totatives
Totatives of a positive integer n are the integers k in the range 1 ≤ k ≤ n that are coprime to n, i.e., gcd(k, n) = 1. In other words, they are the numbers less than or equal to n that share no prime factor with n. For n > 1, n itself is not a totative because gcd(n, n) = n > 1; for n = 1 the totative is {1}.
The totatives are counted by Euler's totient function φ(n), so there are φ(n) totatives. The set of
Examples illustrate the concept: for n = 12, the totatives are {1, 5, 7, 11} and φ(12) =
Several properties follow from the definition. If a is a totative of n, then so is n−a
---