Carmichael Function
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
.
![lambda(n)={phi(n) for n=p^alpha, with p=2 and alpha<=2, or p>=3; 1/2phi(n) for n=2^alpha and alpha>=3; LCM[lambda(p_i^(alpha_i))]_i for n=product_(i)p_i^(alpha_i).](/National_Library/20161007105358im_/http://mathworld.wolfram.com/images/equations/CarmichaelFunction/NumberedEquation2.gif)


Busy Beaver 4-state 2-color



