There are two definitions of the Carmichael function. One is the reduced totient function (also called the least universal exponent function), defined as the smallest integer such that for all relatively prime to . The multiplicative order of (mod ) is at most (Ribenboim 1989). The first few values of this function, implemented as CarmichaelLambda[n], are 1, 1, 2, 2, 4, 2, 6, 2, 6, 4, 10, ... (OEIS A002322).
It is given by the formula
(1)
|
where are primaries.
It can be defined recursively as
(2)
|
Some special values include
(3)
|
and
(4)
|
where is a primorial (S. M. Ruiz, pers. comm., Jul. 5, 2009).
The second Carmichael's function is given by the least common multiple (LCM) of all the factors of the totient function , except that if , then is a factor instead of . The values of for the first few are 1, 1, 2, 2, 4, 2, 6, 4, 6, 4, 10, 2, 12, ... (OEIS A011773).
This function has the special value
(5)
|
for an odd prime and .