 Carmichael Lambda Function - Maple Help

Home : Support : Online Help : Mathematics : Number Theory : Carmichael Lambda Function

NumberTheory

 CarmichaelLambda
 Carmichael's lambda function Calling Sequence

 CarmichaelLambda(n) lambda(n) $\mathrm{\lambda }\left(n\right)$ Parameters

 n - positive integer Description

 • The size of the largest cyclic group generated by ${g}^{i}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathbf{mod}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}n$ is given by CarmichaelLambda(n).
 • Alternatively, CarmichaelLambda(n) is the smallest integer $i$ such that for all $g$ coprime to $n$, ${g}^{i}$ is congruent to $1$ modulo $n$.
 • lambda is an alias for CarmichaelLambda.
 • You can enter the command lambda using either the 1-D or 2-D calling sequence. For example, lambda(8) is equivalent to $\mathrm{\lambda }\left(8\right)$. Examples

 > $\mathrm{with}\left(\mathrm{NumberTheory}\right):$
 > $\mathrm{seq}\left(\mathrm{Totient}\left(i\right),i=1..7\right)$
 ${1}{,}{1}{,}{2}{,}{2}{,}{4}{,}{2}{,}{6}$ (1)
 > $\mathrm{seq}\left(\mathrm{CarmichaelLambda}\left(i\right),i=1..7\right)$
 ${1}{,}{1}{,}{2}{,}{2}{,}{4}{,}{2}{,}{6}$ (2)
 > $\mathrm{CarmichaelLambda}\left(8\right)$
 ${2}$ (3)
 > $\mathrm{Totient}\left(8\right)$
 ${4}$ (4)
 > $\mathrm{\lambda }\left(21\right)$
 ${6}$ (5)
 > $\mathrm{Totient}\left(21\right)$
 ${12}$ (6)
 > $\mathrm{CarmichaelLambda}\left(k\right)$
 ${\mathrm{CarmichaelLambda}}{}\left({k}\right)$ (7)

Carmichael's theorem states that ${g}^{\mathrm{\lambda }\left(n\right)}$ is congruent to $1$ modulo $n$ if $g$ and $n$ are coprime.

 > $d≔\mathrm{CarmichaelLambda}\left(112\right)$
 ${d}{≔}{12}$ (8)
 > $\left\{\mathrm{seq}\left(\mathrm{if}\left(\mathrm{igcd}\left(g,112\right)=1,{g}^{d}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathbf{mod}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}112,\mathrm{NULL}\right),g=1..111\right)\right\}$
 $\left\{{1}\right\}$ (9) Compatibility

 • The NumberTheory[CarmichaelLambda] command was introduced in Maple 2016.