ArticleslgStudy

mathematics

Carmichael function

Carmichael function is a mathematics topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Carmichael function rather than just read about it. In short: In number theory, a branch of mathematics, the Carmichael function λ(n) of a positive integer n is the smallest positive integer m such that am≡1(modn) holds for every integer a coprime to n. In algebraic terms, λ(n) is the exponent of the multiplicative group of integers modulo n.

Carmichael function — main illustration
Carmichael function — illustration

Key takeaways

  • Carmichael function belongs to mathematics; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Carmichael function to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Carmichael function from memory before moving on to harder problems.

Reference excerpt

In number theory, a branch of mathematics, the Carmichael function λ(n) of a positive integer n is the smallest positive integer m such that am≡1(modn) holds for every integer a coprime to n. In algebraic terms, λ(n) is the exponent of the multiplicative group of integers modulo n. As this is a finite abelian group, there must exist an element whose order equals the exponent, λ(n). Such an element is called a primitive λ-root modulo n.

The Carmichael function is named after the American mathematician Robert Carmichael who defined it in 1910. 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 n is φ(n), where φ is Euler's totient function. Since the order of an element of a finite group divides the order of the group, λ(n) divides φ(n). The following table compares the first 36 values of λ(n) (sequence A002322 in the OEIS) and φ(n) (in bold if they are different; the values of n such that they are different are listed in (sequence A033949 in the OEIS)).

Numerical examples n = 5. The set of numbers less than and coprime to 5 is {1,2,3,4}. Hence Euler's totient function has value φ(5) = 4 and the value of Carmichael's function, λ(5), must be a divisor of 4. The divisor 1 does not satisfy the definition of Carmichael's function since a1≢1(mod5) except for a≡1(mod5). Neither does 2 since 22≡32≡4≢1(mod5). Hence λ(5) = 4. Indeed, 14≡24≡34≡44≡1(mod5). Both 2 and 3 are primitive λ-roots modulo 5 and also primitive roots modulo 5. n = 8. The set of numbers less than and coprime to 8 is {1,3,5,7} . Hence φ(8) = 4 and λ(8) must be a divisor of 4. In fact λ(8) = 2 since 12≡32≡52≡72≡1(mod8). The primitive λ-roots modulo 8 are 3, 5, and 7. There are no primitive roots modulo 8.

Recurrence for λ(n) 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, λ(n) is given by the recurrence λ(n)={φ(n)if n is 1, 2, 4, or a power of an odd prime,12φ(n)if n=2r, r≥3,lcm⁡(λ(n1),λ(n2),…,λ(nk))if n=n1n2…nk where n1,n2,…,nk are powers of distinct primes. Euler's totient for a prime power, that is, a number pr with p prime and r ≥ 1, is given by φ(pr)=pr−1(p−1).

Carmichael's theorems Carmichael proved two theorems that, together, establish that if λ(n) 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 m such that am≡1(modn) for all a relatively prime to n.

This implies that the order of every element of the multiplicative group of integers modulo n divides λ(n). Carmichael calls an element a for which aλ(n) is the least power of a congruent to 1 (mod n) a primitive λ-root modulo n. (This is not to be confused with a primitive root modulo n, which Carmichael sometimes refers to as a primitive φ-root modulo n.)

If g is one of the primitive λ-roots guaranteed by the theorem, then gm≡1(modn) has no positive integer solutions m less than λ(n), showing that there is no positive m < λ(n) such that am≡1(modn) for all a relatively prime to n. The second statement of Theorem 2 does not imply that all primitive λ-roots modulo n are congruent to powers of a single root g. For example, if n = 15, then λ(n) = 4 while φ(n)=8 and φ(λ(n))=2. There are four primitive λ-roots modulo 15, namely 2, 7, 8, and 13 as 1≡24≡84≡74≡134. The roots 2 and 8 are congruent to powers of each other and the roots 7 and 13 are congruent to powers of each other, but neither 7 nor 13 is congruent to a power of 2 or 8 and vice versa. The other four elements of the multiplicative group modulo 15, namely 1, 4 (which satisfies 4≡22≡82≡72≡132), 11, and 14, are not primitive λ-roots modulo 15. For a contrasting example, if n = 9, then λ(n)=φ(n)=6 and φ(λ(n))=2. There are two primitive λ-roots modulo 9, namely 2 and 5, each of which is congruent to the fifth power of the other. They are also both primitive φ-roots modulo 9. The numbers of primitive λ-roots modulo n for n=1,2,3,⋯ are

Properties of the Carmichael function In this section, an integer n is divisible by a nonzero integer m if there exists an integer k such that n=km. This is written as m∣n.

A consequence of minimality of λ(n) Suppose am ≡ 1 (mod n) for all numbers a coprime with n. Then λ(n) | m. Proof: If m = kλ(n) + r with 0 ≤ r < λ(n), then ar=1k⋅ar≡(aλ(n))k⋅ar=akλ(n)+r=am≡1(modn) for all numbers a coprime with n. It follows that r = 0 since r < λ(n) and λ(n) is the minimal positive exponent for which the congruence holds for all a coprime with n.

λ(n) divides φ(n) This follows from elementary group theory, because the exponent of any finite group must divide the order of the group. λ(n) is the exponent of the multiplicative group of integers modulo n while φ(n) 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.

Divisibility a|b⇒λ(a)|λ(b) Proof. By definition, for any integer k with gcd⁡(k,b)=1 (and thus also gcd⁡(k,a)=1), we have that b|(kλ(b)−1) , and therefore a|(kλ(b)−1). This establishes that kλ(b)≡1(moda) for all k relatively prime to a. By the consequence of minimality proved above, we have λ(a)|λ(b).

Composition For all positive integers a and b it holds that λ(lcm(a,b))=lcm(λ(a),λ(b)). This is an immediate consequence of the recurrence for the Carmichael function.

Exponential cycle length If rmax=maxi{ri} is the biggest exponent in the prime factorization n=p1r1p2r2⋯pkrk of n, then for all a (including those not coprime to n) and all r ≥ rmax, ar≡aλ(n)+r(modn). In particular, for square-free n ( rmax = 1), for all a we have a≡aλ(n)+1(modn).

… excerpt ends here. Continue reading the full article.

Illustrations

Carmichael function: Carmichael  λ function:  λ(n) for  1 ≤ n ≤ 1000 (compared to Euler  φ function)
Carmichael λ function: λ(n) for 1 ≤ n ≤ 1000 (compared to Euler φ function)

Worked examples

Example 1 — a first encounter with Carmichael function

Start with the simplest possible case. Write down what Carmichael function claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In mathematics, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Carmichael function before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Carmichael function ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Carmichael function

In research
Carmichael function appears in mathematics research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Carmichael function in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Carmichael function is common in secondary-school and first-year university syllabi. It links to neighbouring topics Functions and mappings, Modular arithmetic, so understanding it makes those chapters shorter.
In everyday life
Look for Carmichael function outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Carmichael function” →

How to study Carmichael function in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Carmichael function means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Carmichael function out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Carmichael function in simple terms?

In number theory, a branch of mathematics, the Carmichael function λ(n) of a positive integer n is the smallest positive integer m such that am≡1(modn) holds for every integer a coprime to n. In algebraic terms, λ(n) is the exponent of the multiplicative group of integers modulo n.

Why does Carmichael function matter?

Because it connects several mathematics ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Carmichael function?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Carmichael function.

Tags

  • Functions and mappings
  • Modular arithmetic

Keep exploring