Trisha Shetty (Editor)

Carmichael function

Updated on
Edit
Like
Comment
Share on FacebookTweet on TwitterShare on LinkedInShare on Reddit

In number theory, the Carmichael function of a positive integer n, denoted λ ( n ) , is defined as the smallest positive integer m such that

Contents

a m 1 ( mod n )

for every integer a that is coprime to n. 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 ψ ( n ) .

The first 36 values of λ ( n ) (sequence A002322 in the OEIS) compared to Euler's totient function φ . (in bold if they are different)

Numerical example

72 = 49 ≡ 1 (mod 8) because 7 and 8 are coprime (their greatest common divisor equals 1; they have no common factors) and the value of Carmichael's function at 8 is 2. Euler's totient function is 4 at 8 because there are 4 numbers lesser than and coprime to 8 (1, 3, 5, and 7). Whilst it is true that 74 = 2401 ≡ 1 (mod 8), as shown by Euler's theorem, raising 7 to the fourth power is unnecessary because the Carmichael function indicates that 7 squared is congruent to 1 (mod 8). Raising 7 to exponents greater than 2 only repeats the cycle 7, 1, 7, 1, ... . Because the same holds true for 3 and 5, the Carmichael number is 2 rather than 4.

Carmichael's theorem

For a power of an odd prime, twice the power of an odd prime, and for 2 and 4, λ(n) is equal to the Euler totient φ(n); for powers of 2 greater than 2 it is equal to half of the Euler totient:

λ ( n ) = { φ ( n ) if  n = 2 , 3 , 4 , 5 , 6 , 7 , 9 , 10 , 11 , 13 , 14 , 17 , 18 , 19 , 22 , 23 , 25 , 26 , 27 , 29 , 1 2 φ ( n ) if  n = 8 , 16 , 32 , 64 , 128 , 256 ,

Euler's function for prime powers is given by

φ ( p k ) = p k 1 ( p 1 ) .

By the fundamental theorem of arithmetic any n > 1 can be written in a unique way

n = p 1 a 1 p 2 a 2 p ω ( n ) a ω ( n )

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:

λ ( n ) = lcm [ λ ( p 1 a 1 ) , λ ( p 2 a 2 ) , , λ ( p ω ( n ) a ω ( n ) ) ] .

Carmichael's theorem states that if a is coprime to n, then

a λ ( n ) 1 ( mod n ) ,

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.

Proofs

The following proofs proceed by induction.

Proof for Odd Prime Powers

From Fermat's little theorem, we have a p 1 = 1 + h p . For k = 1, h an integer:

a p k 1 ( p 1 ) = 1 + h p k a p k ( p 1 ) = ( 1 + h p k ) p = 1 + h p k + 1 + = 1 + h 0 p k + 1

for some integer h0.

By induction, we have a p k 1 ( p 1 ) 1 ( mod p k ) .

Proof for Powers of Two

For a coprime to powers of 2 we have a = 1 + 2 h . Then,

a 2 = 1 + 4 h ( h + 1 ) = 1 + 8 C h + 1 2

where we take advantage of the fact that C h + 1 2 = ( h + 1 ) h / 2 is an integer.

So, for k = 3, h an integer:

a 2 k 2 = 1 + 2 k h a 2 k 1 = ( 1 + 2 k h ) 2 = 1 + 2 k + 1 ( h + 2 k 1 h 2 )

By induction, when k ≥ 3, we have a 2 k 2 1 ( mod 2 k ) .

Hierarchy of results

Since λ(n) divides φ(n), Euler's totient function (the quotients are listed in  A034380), the Carmichael function is a stronger result than the classical Euler's theorem. Clearly 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 gives the same result, because the group in question is a cyclic group for which the order and exponent are both p − 1.

Divisibility

a | b λ ( a ) | λ ( b )

Composition

For all positive integers a and b it holds

λ ( l c m ( a , b ) ) = l c m ( λ ( a ) , λ ( b ) ) .

This is an immediate consequence of the recursive definition of the Carmichael function.

Primitive m-th roots of unity

Let a and n be coprime and let m be the smallest exponent with a m 1 ( mod n ) , then it holds

m | λ ( n ) .

That is, the orders of primitive roots of unity in the ring of integers modulo n are divisors of λ ( n ) .

Exponential cycle length

For a number n with maximum prime exponent of x m a x under prime factorization, then for all a (including those not co-prime to n ) and all k x m a x ,

a k a k + λ ( n ) ( mod n )

In particular, for squarefree n ( x m a x = 1 ), for all a

a a λ ( n ) + 1 ( mod n )

Average and typical value

For any x > 16:

1 x n x λ ( n ) = x ln x e B ( 1 + o ( 1 ) ) ln ln x / ( ln ln ln x ) .

Where B is a constant,

B = e γ p ( 1 1 ( p 1 ) 2 ( p + 1 ) ) 0.34537   .

For all numbers N and all except o(N) positive integers n ≤ N:

λ ( n ) = n / ( ln n ) ln ln ln n + A + o ( 1 )

where A is a constant,

A = 1 + p log p ( p 1 ) 2 0.2269688   .

Lower bounds

For any sufficiently large number N and for any Δ ( ln ln N ) 3 , there are at most

N e 0.69 ( Δ ln Δ ) 1 / 3

positive integers n N such that λ ( n ) n e Δ .

For any sequence n 1 < n 2 < n 3 < of positive integers, any constant 0 < c < 1 / ln 2 , and any sufficiently large i:

λ ( n i ) > ( ln n i ) c ln ln ln n i .

Small values

For a constant c and any sufficiently large positive A, there exists an integer n > A such that λ ( n ) < ( ln A ) c ln ln ln A . Moreover, n is of the form

n = ( q 1 ) | m  and  q  is prime q

for some square-free integer m < ( ln A ) c ln ln ln A .

Image of the function

The set of values of the Carmichael function has counting function

x ( log x ) η + o ( 1 )   ,

where η = 1 1 + log log 2 log 2 = 0.08607 ….

References

Carmichael function Wikipedia