In number theory, a branch of mathematics, the Carmichael function of a positive integer is the smallest member of the set of positive integers having the property that
am\equiv1\pmod{n}
The Carmichael function is named after the American mathematician Robert Carmichael who defined it in 1910.[1] It is also known as Carmichael's λ function, the reduced totient function, and the least universal exponent function.
The order of the multiplicative group of integers modulo is, where is Euler's totient function. Since the order of an element of a finite group divides the order of the group, divides . The following table compares the first 36 values of and (in bold if they are different; the s such that they are different are listed in).
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 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | ||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
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 | 18 | 6 | 28 | 4 | 30 | 8 | 10 | 16 | 12 | 6 | ||
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 | 18 | 12 | 28 | 8 | 30 | 16 | 20 | 16 | 24 | 12 |
a1\not\equiv1\pmod{5}
a\equiv1\pmod{5}
22\equiv32\equiv4\not\equiv1\pmod{5}
14\equiv24\equiv34\equiv44\equiv1\pmod{5}
12\equiv32\equiv52\equiv72\equiv1\pmod{8}
The Carmichael lambda function of a prime power can be expressed in terms of the Euler totient. Any number that is not 1 or a prime power can be written uniquely as the product of distinct prime powers, in which case of the product is the least common multiple of the of the prime power factors. Specifically, is given by the recurrence
λ(n)=\begin{cases} \varphi(n)&ifnis1,2,4,oranoddprimepower,\\ \tfrac12\varphi(n)&
r, r\ge3,\\ \operatorname{lcm}l(λ(n | |
ifn=2 | |
1),λ(n |
2),\ldots,λ(nk)r)&ifn=n1n2\ldotsnkwheren1,n2,\ldots,nkarepowersofdistinctprimes. \end{cases}
\varphi(pr){{=}}pr-1(p-1).
Carmichael proved two theorems that, together, establish that if is considered as defined by the recurrence of the previous section, then it satisfies the property stated in the introduction, namely that it is the smallest positive integer such that
am\equiv1\pmod{n}
aλ(n)
\varphi
gm\equiv1\pmod{n}
am\equiv1\pmod{n}
The second statement of Theorem 2 does not imply that all primitive -roots modulo are congruent to powers of a single root .[3] For example, if, then while
\varphi(n)=8
\varphi(λ(n))=2
1\equiv24\equiv84\equiv74\equiv134
4\equiv22\equiv82\equiv72\equiv132
For a contrasting example, if, then
λ(n)=\varphi(n)=6
\varphi(λ(n))=2
\varphi
n
m
k
n=km
m\midn.
Suppose for all numbers coprime with . Then .
Proof: If with, then
ar=1k ⋅ ar\equiv\left(aλ(n)\right)k ⋅ ar=akλ(n)+r=am\equiv1\pmod{n}
This follows from elementary group theory, because the exponent of any finite group must divide the order of the group. is the exponent of the multiplicative group of integers modulo while is the order of that group. In particular, the two must be equal in the cases where the multiplicative group is cyclic due to the existence of a primitive root, which is the case for odd prime powers.
We can thus view Carmichael's theorem as a sharpening of Euler's theorem.
a|b ⇒ λ(a)|λ(b)
Proof.
By definition, for any integer
k
\gcd(k,b)=1
\gcd(k,a)=1
b|(kλ(b)-1)
a|(kλ(b)-1)
kλ(b)\equiv1\pmod{a}
λ(a)|λ(b)
For all positive integers and it holds that
λ(lcm(a,b))=lcm(λ(a),λ(b))
If
rmax=maxi\{ri\}
n=
r1 | |
p | |
1 |
r2 | |
p | |
2 |
…
rk | |
p | |
k |
ar\equivaλ(n)+r\pmodn.
In particular, for square-free, for all we have
a\equivaλ(n)+1\pmodn.
1 | |
n |
\sumiλ(i)=
n | |
lnn |
eB
(called Erdős approximation in the following) with the constant
B:=e-\gamma\prodp\inP\left({1-
1 | |
(p-1)2(p+1) |
The following table gives some overview over the first values of the function, for both, the exact average and its Erdős-approximation.
Additionally given is some overview over the more easily accessible with
There, the table entry in row number 26 at column
indicates that 60.49% (≈) of the integers have meaning that the majority of the values is exponential in the length of the input, namely
| ||||
\left(2 |
=
| ||||
2 |
=\left(2l\right)
| ||||
| ||||
n |
sum \sumi\leλ(i) | average \tfrac1n\sumi\leλ(i) | Erdős average | Erdős / exact average | average | % > | % > | |||
5 | 31 | 270 | 8.709677 | 68.643 | 7.8813 | 0.678244 | 41.94 | 35.48 | |
6 | 63 | 964 | 15.301587 | 61.414 | 4.0136 | 0.699891 | 38.10 | 30.16 | |
7 | 127 | 3574 | 28.141732 | 86.605 | 3.0774 | 0.717291 | 38.58 | 27.56 | |
8 | 255 | 12994 | 50.956863 | 138.190 | 2.7119 | 0.730331 | 38.82 | 23.53 | |
9 | 511 | 48032 | 93.996086 | 233.149 | 2.4804 | 0.740498 | 40.90 | 25.05 | |
10 | 1023 | 178816 | 174.795699 | 406.145 | 2.3235 | 0.748482 | 41.45 | 26.98 | |
11 | 2047 | 662952 | 323.865169 | 722.526 | 2.2309 | 0.754886 | 42.84 | 27.70 | |
12 | 4095 | 2490948 | 608.290110 | 1304.810 | 2.1450 | 0.761027 | 43.74 | 28.11 | |
13 | 8191 | 9382764 | 1145.496765 | 2383.263 | 2.0806 | 0.766571 | 44.33 | 28.60 | |
14 | 16383 | 35504586 | 2167.160227 | 4392.129 | 2.0267 | 0.771695 | 46.10 | 29.52 | |
15 | 32767 | 134736824 | 4111.967040 | 8153.054 | 1.9828 | 0.776437 | 47.21 | 29.15 | |
16 | 65535 | 513758796 | 7839.456718 | 15225.43 | 1.9422 | 0.781064 | 49.13 | 28.17 | |
17 | 131071 | 1964413592 | 14987.40066 | 28576.97 | 1.9067 | 0.785401 | 50.43 | 29.55 | |
18 | 262143 | 7529218208 | 28721.79768 | 53869.76 | 1.8756 | 0.789561 | 51.17 | 30.67 | |
19 | 524287 | 28935644342 | 55190.46694 | 101930.9 | 1.8469 | 0.793536 | 52.62 | 31.45 | |
20 | 1048575 | 111393101150 | 106232.8409 | 193507.1 | 1.8215 | 0.797351 | 53.74 | 31.83 | |
21 | 2097151 | 429685077652 | 204889.9090 | 368427.6 | 1.7982 | 0.801018 | 54.97 | 32.18 | |
22 | 4194303 | 1660388309120 | 395867.5158 | 703289.4 | 1.7766 | 0.804543 | 56.24 | 33.65 | |
23 | 8388607 | 6425917227352 | 766029.1187 | 1345633 | 1.7566 | 0.807936 | 57.19 | 34.32 | |
24 | 16777215 | 24906872655990 | 1484565.386 | 2580070 | 1.7379 | 0.811204 | 58.49 | 34.43 | |
25 | 33554431 | 96666595865430 | 2880889.140 | 4956372 | 1.7204 | 0.814351 | 59.52 | 35.76 | |
26 | 67108863 | 375619048086576 | 5597160.066 | 9537863 | 1.7041 | 0.817384 | 60.49 | 36.73 |
For all numbers and all but [6] positive integers (a "prevailing" majority):
λ(n)=
n | |
(lnn)lnlnln |
A:=-1+\sump\inP
lnp | |
(p-1)2 |
≈ 0.2269688
For any sufficiently large number and for any, there are at most
| ||||
N\exp\left(-0.69(\Deltaln\Delta) |
For any sequence of positive integers, any constant, and any sufficiently large :[8] [9]
λ(ni)>\left(ln
clnlnlnni | |
n | |
i\right) |
.
For a constant and any sufficiently large positive, there exists an integer such that[9]
λ(n)<\left(lnA\right)clnlnln.
n=\prodq | |
(q-1)|m |
q
The set of values of the Carmichael function has counting function[10]
x | |
(lnx)η+o(1) |
,
η=1- | 1+lnln2 |
ln2 |
≈ 0.08607
The Carmichael function is important in cryptography due to its use in the RSA encryption algorithm.
For, a prime, Theorem 1 is equivalent to Fermat's little theorem:
ap-1\equiv1\pmod{p} forallacoprimetop.
pr-1(p-1) | |
a |
=1+hpr
pr(p-1) | |
a |
=1+h'pr+1
h'
\varphi(pr) | |
a |
\equiv1\pmod{pr}
For coprime to (powers of) 2 we have for some integer . Then,
a2=1+4h2(h2+1)=1+8\binom{h2+1}{2}=:1+8h3
h3
2r-2 | |
a |
=1+2rhr.
2r-1 | |
a |
=\left(1+2r
2=1+2 | |
h | |
r\right) |
r+1
r-1 | |
\left(h | |
r+2 |
2\right)=:1+2 | |
h | |
r |
r+1hr+1,
hr+1
2r-2 | |
a |
| |||||
=a |
\equiv1\pmod{2r}
r\ge3
2r
By the unique factorization theorem, any can be written in a unique way as
n=
r1 | |
p | |
1 |
r2 | |
p | |
2 |
…
rk | |
p | |
k |
1\lej\lek
| ||||||||||
a |
\equiv1
rj | |
\pmod{p | |
j |
aλ(n)\equiv1
rj | |
\pmod{p | |
j |
λ(n)=
r1 | |
\operatorname{lcm}l(λ\left(p | |
1 |
r2 | |
\right),λ\left(p | |
2 |
rk | |
\right),\ldots,λ\left(p | |
k |
\right)r).
aλ(n)\equiv1\pmod{n} forallacoprimeton.