In number theory, the Carmichael function of a positive integer n, denoted , is defined as the smallest positive integer m such that
for every integer a that is coprime to n. In other words, in more algebraic terms, it defines the exponent of the multiplicative group of integers modulo n. The Carmichael function is also known as the reduced totient function or the least universal exponent function, and is sometimes also denoted .
The first 26 values of (sequence A002322 in OEIS) compared to Euler's totient function :
n | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | 1 | 2 | 2 | 4 | 2 | 6 | 2 | 6 | 4 | 10 | 2 | 12 | 6 | 4 | 4 | 16 | 6 | 18 | 4 | 6 | 10 | 22 | 2 | 20 | 12 | |
1 | 1 | 2 | 2 | 4 | 2 | 6 | 4 | 6 | 4 | 10 | 4 | 12 | 6 | 8 | 8 | 16 | 6 | 18 | 8 | 12 | 10 | 22 | 8 | 20 | 12 |
Contents |
52 ≡ 1 (mod 6) because 5 and 6 are coprime. In other words, gcd(5,6)=1. Here we had to raise 5 to the 2nd power because the Carmichael function of 6 is 2.[1] Recall that 1 and 5 are the only two numbers smaller than 6 that are relatively prime to 6.
However, 32 = 9 ≡ 3 (mod 6) obviously doesn't work because the number 3 is impermissible as a base to be raised to the 2nd power. We know that gcd(3,6)=3, not 1.
For powers of odd primes and for 2 and 4, λ(n) is equal to the Euler totient φ(n); for powers of 2 greater than 4 it is equal to one half of the Euler totient:
Euler's function for prime powers is given by
By the fundamental theorem of arithmetic any n > 1 can be written in a unique way
where p1 < p2 < ... < pω are primes and the ai > 0. (n = 1 corresponds to the empty product.)
For general n λ(n) is the least common multiple of λ of each of its prime power factors:
Carmichael's theorem states that if a is coprime to n, then
where is the Carmichael function defined above. In other words, it asserts the correctness of the formulas. This can be proven by considering any primitive root modulo n and the Chinese remainder theorem.
The classical Euler's theorem implies that λ(n) divides φ(n), Euler's totient function. In fact Carmichael's theorem is related to Euler's theorem, because the exponent of a finite abelian group must divide the order of the group, by elementary group theory. The two functions differ already in small cases: λ(15) = 4 while φ(15) = 8 (see A033949 for the associated n).
Fermat's little theorem is the special case of Euler's theorem in which n is a prime number p. Carmichael's theorem for a prime p adds nothing to Fermat's theorem, because the group in question is a cyclic group for which the order and exponent are both p − 1.
For all positive integers and it holds
This is an immediate consequence of the recursive definition of the Carmichael function.
Let and be coprime and let be the smallest exponent with , then it holds
That is, the orders of primitive roots of unity in the ring of integers modulo are divisors of .
For any x > 16, and a constant B ≈ 0.34537:
For all numbers N and all except o(N) positive integers n ≤ N:
where A is a constant, A ≈ 0.226969.[3]
For any sufficiently large number N and for any , there are at most
positive integers such that .[4]
For any sequence of positive integers, any constant , and any sufficiently large i:
For a constant c and any sufficiently large positive A, there exists an integer such that . Moreover, n is of the form
for some square-free integer .[6]