Carmichael Lambda Function
Return the exponent of the multiplicative group modulo n exactly from prime powers and their lcm, with λ(1)=1 and trial division limited to n≤10¹².
Description
Carmichael’s lambda is the smallest universal exponent of units modulo n.
Carmichael’s lambda is the smallest universal exponent of units modulo n. Combining the exponents for prime powers requires a least common multiple.1
The tool returns value. The indexing and output conventions below determine how to read these values.
When to use Carmichael Lambda Function
Use this for the following task: Return the exponent of the multiplicative group modulo n exactly from prime powers and their lcm, with λ(1)=1 and trial division limited to n≤10¹². Use the input and output conventions below to reproduce the intended mathematical quantity.
How to use Carmichael Lambda Function and understand its results
- Choose the required indexes, integers or sequence entries. Preserve decimal-string encodings where the field table specifies strings.
- Enter n according to the field table, then run the tool.
- Read value. Preserve exact decimal strings and the stated indexing or coefficient order.
- Keep exact decimal strings for subsequent integer arithmetic; distinguish them from any explicitly approximate numeric result.
| Input field | Meaning | Value type and bounds | Requirement |
|---|---|---|---|
| n | Positive modulus (trial-division resource limit 10^12) | integer; minimum 1; maximum 1000000000000 | Required |
Factor n, apply the special power-of-two case and combine local BigInt exponents using gcd-based lcm. Return an exact decimal string with λ(1)=1.
λ(n)=lcm of λ(p^a); λ(2^a)=2^(a−2) for a≥3; otherwise λ(p^a)=p^(a−1)(p−1) The symbols and boundary conditions refer to the supplied fields and the implementation described above.
| Output field | Meaning | Value type |
|---|---|---|
| value | Carmichael lambda value | string (integer/arbitrary) |
{
"input": {
"n": 72
},
"output": {
"value": "6"
}
} Limitations and assumptions
The modulus is at most 10¹². This is distinct from Liouville’s sign-valued lambda and does not test whether n is a Carmichael number.
Use the declared integer bounds and string formats. Large exact outputs remain decimal strings; numerical approximations use ordinary floating-point arithmetic. A rejected input is different from a valid zero count or false membership flag.
Alternative or Complementary methods
Choose Carmichael Number Checker when you need its operation: Check the composite, square-free, and p−1-divides-n−1 conditions of Korselt’s criterion for a Carmichael number; trial division is limited to n≤10¹². Choose Least Common Multiple of a List for the complementary operation: Compute the nonnegative least common multiple of 1–128 signed decimal integers using exact arithmetic; any zero entry makes the result zero.
Background reference: Carmichael function.
References
-
Carmichael function — OEIS Foundation
Similar or alternative tools
- Carmichael Number Checker
Check the composite, square-free, and p−1-divides-n−1 conditions of Korselt’s criterion for a Carmichael number; trial division is limited to n≤10¹².
- Least Common Multiple of a List
Compute the nonnegative least common multiple of 1–128 signed decimal integers using exact arithmetic; any zero entry makes the result zero.