第22篇

\section{A Note on the Carmichael Function}%22
\markboth{Articles}{A Note on the Carmichael Function}

\vspace{4.2cm}

The well-known Euler's theorem states that
$x^{\varphi (m)}\equiv 1\pmod m$
for every positive integer $m$ and every integer $x$ coprime to $m$, where $\varphi $ is the Euler's
totient function.
However, with some exceptions, $\varphi (m)$ is usually not the
least positive integer $t$ so that
$x^t\equiv 1\pmod m$
holds for all integers $x$ with
$\gcd(x,m)=1$
and can be "optimized" to the so-called Carmichael Function $\lambda (m)$.
Properties of this function keep appearing in Olympiad problems and
can often be very useful.
The purpose of this note is to state and prove some
of these properties and to give some examples of how they can be applied in
Olympiad problems.

\subsection{Introduction}
The following problem was given at the 3rd round of the 2006 Iranian National
Olympiad.

{\bf Problem 1.}
{\it Let $n$ be a positive integer and let $d$ be the least positive integer,
such that
$a^d\equiv 1\pmod n$
for every integer $a$ with $\gcd(a, n) = 1$.
Prove that there exists an integer $b$ so that $\ord_n(b) = d.$
}

We will see that this problem is a special case of a more general result, but
before proving it, we shall cover some theory.

{\bf Definition 1.}
For a positive integer $m$ and an integer $x$ with $\gcd(x,m) = 1,$
the order of $x$ modulo $m$, denoted by $\ord_m(x)$, is the least positive integer $t$,
so that $x^t\equiv 1\pmod m$.

Euler's theorem implies that $\ord_m(x)\le \varphi (m)$.

{\bf Lemma 1.}
{\it Let $m$ be a positive integer and $x$ be an integer coprime to $m$.
Then
$x^n\equiv 1\pmod m$ if and only if $\ord_m(x)\mid n$.
Furthermore,
$x^{n_1}\equiv x^{n_2}\pmod m$
if and only if
$\ord_m(x)\mid (n_1-n_2)$,
i.e.,
$n_1\equiv n_2\pmod {\ord_m(x)}$.
}

{\bf Proof.}
Let $d=\ord_m(x)$.
It is clear that $d\mid n$ implies
$x^n\equiv 1\pmod m$.
On the other hand,
$x^n\equiv 1\pmod m$,
then there are integers $q,r$ such that
$n=qd+r$, $0\le r\le d-1$, and
$$x^n\equiv x^{qd+r}\equiv x^r\equiv 1\pmod m.$$

But $0\le r\le d-1$, so $r=0$.

{\bf Definition 2.}
Let $m$ be a positive integer.
An integer $g$ is called a primitive root modulo m if $\ord_m(g)=\varphi (m)$.

Unfortunately, roots do not exist for every positive integer $m$.

{\bf Lemma 2.}
{\it Let $m$ be a positive integer greater than 1.
Then primitive roots
modulo $m$ exist if and only if $m$ has the form 2, 4, $p^k$ or $2p^k$ where $p$ is an
odd prime number and $k$ is a positive integer.
}

This theorem is very well known, so we skip the rather long proof of it
(interested readers can find a proof in [2]).

\subsection{The Carmichael Function}
{\bf Definition 3.}
For a positive integer $m$, $\lambda (m)$ denotes the least positive integer
$t$ so that
$x^t\equiv 1\pmod m$
for all integers $x$ with $\gcd(x,m)=1$.
$\lambda (m)$ is the so-called Carmichael Function.

{\bf Lemma 3.}
{\it Let $m$ be a positive integer.
Then
$\lambda (m)\mid t$ if and only if $x^t\equiv 1\pmod m$
for all integers $x$ coprime to $m$.
}

The proof of Lemma 3 is similar to the proof of Lemma 1 and is left as an
exercise to the reader.
Note that Euler's theorem implies $\lambda (m)\le \varphi (m)$.
It is clear that if $m$ has primitive roots, then
$\lambda (m)=\varphi (m)$.
We will now find a formula for $\lambda (m)$.

{\bf Lemma 4.}
{\it Let $k\ge 3$ be an integer.
Then
$\lambda (2^k)=2^{k-2}$.
}

{\bf Proof.}
We first observe that $x^2\equiv 1\pmod 8$ for all odd integers $x$.
Using induction, we can assume that $x^{2^{k-2}}\equiv 1\pmod {2^k}$
for all odd $x$ and some $k\ge 3$.
Then either
$$x^{2^{k-2}}\equiv 1\pmod {2^{k+1}}
\q\mbox{or}\q
x^{2^{k-2}}\equiv 1+2^k\pmod {2^{k+1}}.$$

However, we have
$x^{2^{k-1}}\equiv 1\pmod {2^{k+1}}$
in both cases, implying
$\lambda (2^k)\le 2^{k-2}$.
Now, let $x$ be an odd integer so that
$\ord_{16}(x)=4$
(i.e., each integer congruent to 3 or 5 modulo 8).
We clearly have
$\ord_8(x)=2$.
By induction, we can assume that
$\ord_{2^k}(x)=2^{k-2}$
and
$\ord_{2^{k+1}}(x)=2^{k-1}$ for some $k\ge 3$.
Then
$x^{2^{k-2}}\equiv 1\pmod {2^k}$
but
$x^{2^{k-2}}\not\equiv \pmod {2^{k+1}}$,
implying
$x^{2^{k-2}}\equiv 1+2^k\pmod {2^{k+1}}$.
Hence, either
$$x^{2^{k-2}}\equiv 1+2^k\pmod {2^{k+2}}
\q\mbox{or}\q
x^{2^{k-2}}\equiv 1+2^k+2^{k+1}\pmod {2^{k+2}}.$$

In both cases we have
$$x^{2^{k-1}}\equiv 1+2^{k+1}\not\equiv 1\pmod {2^{k+2}}.$$

Thus
$\ord_{2^{k+2}}(x)>2^{k-1}$.
On the other hand,
$\ord_{2^{k+2}}(x)\mid \varphi (2^{k+2})=2^{k+1}$
by Lemma 1, so
$\ord_{2^{k+2}}(x)\in \{2^k,2^{k+1}\}$.
But
$\ord_{2^{k+2}}(x)$ cannot exceed $\lambda (2^{k+2})$
and we already know that
$\lambda (2^{k+2})\le 2^k$.
It follows that
$\ord_{2^{k+2}}(x)=2^k$ and thus
$\lambda (2^{k+2})=2^k$.

The proof of Lemma 4 also proves the following lemma.

{\bf Lemma 1.}
{\it For each $x$ congruent to $3$ or $5$ modulo $8$,
$$\ord_{2^k}(x)=\lambda (2^k)=2^{k-2}$$
for all $k\ge 3$.
}

Now, let $a$ and $b$ be two coprime positive integers and let
$d_1=\lambda (a)$, $d_2=\lambda (b)$, $d=\lambda (ab)$.
Then $x^d\equiv 1\pmod {ab}$
for any integer $x$ coprime to $ab$, so
$$x^d\equiv 1\pmod a
\q\mbox{and}\q
x^d\equiv 1\pmod b
\eqno(1)$$
for all integers $x$ coprime to $ab$.
Now, from Lemma 3 it follows that $d_1\mid d$ and $d_2\mid d$
is a necessary and sufficient condition for (1) and since $d$ is the least
positive integer satisfying (1), it follows that
$d={\rm lcm}(d_1,d_2)$.
As a result we have the following lemma.

{\bf Lemma 5.}
{\it For any coprime positive integers $a$ and $b$,
$$\lambda (ab)={\rm lcm}(\lambda (a),\lambda (b)).$$

}


We see that Lemma 2, 4, and 5 already give a complete formula for $\lambda (m)$.

We summarize:

{\bf Theorem 1.}
{\it Let $m$ be a positive integer greater than $1$.
Then
$$\lambda (m)=
\left\{\ba{ll}
\varphi (m) & \mbox{for } m=2,4,p^k,\ \mbox{where}\ p\ge 3\ \mbox{is prime}\\
2^{k-2} & \mbox{for } m=2^k,\ \mbox{where}\ k\ge 3\\
{\rm lcm}(\lambda (p_1^{k_1}),\ldots ,\lambda (p_r^{k_r})) & \mbox{for } m=\ds\prod_{i=1}^r p_i^{k_i},
\ \mbox{where}\ p_i\mbox{ are distinct}\\
& \mbox{prime numbers}.
\ea\right.$$

}

We can now return to the beginning of this note and solve Problem 1.

{\bf Lemma 6.}
{\it For any positive integer $m$, there exists an integer $x$ so that
$$\ord_m(x)=\lambda (m).$$

}

{\bf Proof.}
Let $m=p_1^{k_1}\ldots p_r^{k_r}$
be the prime factorization of $m$ and let $x$ be a solution of the congruence system
$$x\equiv g_i\pmod {p_i^{k_i}}\mbox{ for } i=1,\ldots ,r,$$
where $g_i$ are integers satisfying
$\ord_{p_i^{k_i}}(x)=\lambda (p_i^{k_i})$
respectively (they exist by Lemma 2 and 1).
Such an $x$ exists by the Chinese Remainder Theorem.
Then by Lemma 1,
$\lambda (p_i^{k_i})=\ord_{p_i^{k_i}}(x)\mid \ord_m(x)$ for all $i=1,\ldots ,r$.
Hence
$$\ord_m(x)\ge {\rm lcm}(\lambda (p_1^{k_1}),\ldots ,\lambda (p_r^{k_r}))=\lambda (m).$$

But $\ord_m(x)$ cannot exceed $\lambda (m)$, so $\ord_m(x)=\lambda (m)$.

Lemma 6 can be generalized to

{\bf Theorem 2.}
{\it Let $m$ and $d$ be positive integers.
Then there exists an integer $x$ with
$\ord_m(x)=d$ if and only if $d\mid \lambda (m)$.
}


{\bf Proof.}
If $\ord_m(x)=d$ for some $x$, then Lemma 1 implies $d\mid \lambda (m)$.

On the other hand, if $d\mid \lambda (m)$, let $z$ be an integer with
$\ord_m(z)=\lambda (m)$
(which exists by Lemma 6),
$e=\lambda (m)/d$, and $x=z^e$.
Then
$\ord_m(x)=d$ because
$$x^d=z^{ed}=z^{\lambda (m)}\equiv 1\pmod m$$
and
$\ord_m(x)<d$ would imply
$\ord_m(z)<ed=\lambda (m)$, a contradiction.


The applications of the properties of the Carmichael Function are, when
possible, not always as obvious as it has been in Problem 1.
The following problem illustrates another kind of usage.

{\bf Problem 2.}
{\it Prove that for any positive integer $k$, there is a positive integer
$n$ so that $2^k\mid 3^n+5$.
}

{\bf Solution.}
We will only discuss $k\ge 3$.
The statement is true for $k = 3$, just
take $n = 1$ (we need this for the purpose of induction).

It follows from Lemma 1 that
$\ord_{2^k}(3)=\lambda (2^k)=2^{k-2}$.
However, since
$$\ord_{2^{k+1}}(3)=\lambda (2^{k+1})=2^{k-1}>2^{k-2}=\ord_{2^k}(3),$$
from Lemma 1 it follows that
$3^{i+2^{k-2}}\equiv 3^i\pmod {2^k}$
but
$3^{i+2^{k-2}}\not\equiv 3^i\pmod {2^{k+1}}$
and thus
$3^{i+2^{k-2}}\equiv 3^i+2^k\pmod {2^{k+1}}$.
Hence, if $3^i\equiv -5\pmod {2^k}$,
then either
$3^i\equiv -5\pmod {2^{k+1}}$
or
$3^{i+2^{k-2}}\equiv -5\pmod {2^{k+1}}$.


\section*{Bibliography}
\bi
\item[{[1]}]
Mathlinks, {\it Order,}\\
http://www.mathlinks.ro/Forum/viewtopic.php?t=108204

\item[{[2]}]
Mathlinks, {\it Primitive root,}\\
http://www.mathlinks.ro/Forum/viewtopic.php?t=55473

\item[{[3]}]
Mathlinks,
$(2^k)\mid (3^m+5)$,\\
http://www.mathlinks.ro/Forum/viewtopic.php?t=1912

\ei

\bigskip
\hfill
{\Large Yimin Ge, Vienna, Austria}


%%%%%%%

posted on 2017-11-08 00:55  Eufisky  阅读(164)  评论(0编辑  收藏  举报

导航