第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φ(m)1(modm)
for every positive integer m and every integer x coprime to m, where φ is the Euler's
totient function.
However, with some exceptions, φ(m) is usually not the
least positive integer t so that
xt1(modm)
holds for all integers x with
gcd(x,m)=1
and can be "optimized" to the so-called Carmichael Function λ(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
ad1(modn)
for every integer a with gcd(a,n)=1.
Prove that there exists an integer b so that \ordn(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 \ordm(x), is the least positive integer t,
so that xt1(modm).

Euler's theorem implies that \ordm(x)φ(m).

{\bf Lemma 1.}
{\it Let m be a positive integer and x be an integer coprime to m.
Then
xn1(modm) if and only if \ordm(x)n.
Furthermore,
xn1xn2(modm)
if and only if
\ordm(x)(n1n2),
i.e.,
n1n2(mod\ordm(x)).
}

{\bf Proof.}
Let d=\ordm(x).
It is clear that dn implies
xn1(modm).
On the other hand,
xn1(modm),
then there are integers q,r such that
n=qd+r, 0rd1, and
xnxqd+rxr1(modm).

But 0rd1, so r=0.

{\bf Definition 2.}
Let m be a positive integer.
An integer g is called a primitive root modulo m if \ordm(g)=φ(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, pk or 2pk 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, λ(m) denotes the least positive integer
t so that
xt1(modm)
for all integers x with gcd(x,m)=1.
λ(m) is the so-called Carmichael Function.

{\bf Lemma 3.}
{\it Let m be a positive integer.
Then
λ(m)t if and only if xt1(modm)
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 λ(m)φ(m).
It is clear that if m has primitive roots, then
λ(m)=φ(m).
We will now find a formula for λ(m).

{\bf Lemma 4.}
{\it Let k3 be an integer.
Then
λ(2k)=2k2.
}

{\bf Proof.}
We first observe that x21(mod8) for all odd integers x.
Using induction, we can assume that x2k21(mod2k)
for all odd x and some k3.
Then either
x2k21(mod2k+1)\qor\qx2k21+2k(mod2k+1).

However, we have
x2k11(mod2k+1)
in both cases, implying
λ(2k)2k2.
Now, let x be an odd integer so that
\ord16(x)=4
(i.e., each integer congruent to 3 or 5 modulo 8).
We clearly have
\ord8(x)=2.
By induction, we can assume that
\ord2k(x)=2k2
and
\ord2k+1(x)=2k1 for some k3.
Then
x2k21(mod2k)
but
x2k2(mod2k+1),
implying
x2k21+2k(mod2k+1).
Hence, either
x2k21+2k(mod2k+2)\qor\qx2k21+2k+2k+1(mod2k+2).

In both cases we have
x2k11+2k+11(mod2k+2).

Thus
\ord2k+2(x)>2k1.
On the other hand,
\ord2k+2(x)φ(2k+2)=2k+1
by Lemma 1, so
\ord2k+2(x){2k,2k+1}.
But
\ord2k+2(x) cannot exceed λ(2k+2)
and we already know that
λ(2k+2)2k.
It follows that
\ord2k+2(x)=2k and thus
λ(2k+2)=2k.

The proof of Lemma 4 also proves the following lemma.

{\bf Lemma 1.}
{\it For each x congruent to 3 or 5 modulo 8,
\ord2k(x)=λ(2k)=2k2
for all k3.
}

Now, let a and b be two coprime positive integers and let
d1=λ(a), d2=λ(b), d=λ(ab).
Then xd1(modab)
for any integer x coprime to ab, so
xd1(moda)\qand\qxd1(modb)\eqno(1)
for all integers x coprime to ab.
Now, from Lemma 3 it follows that d1d and d2d
is a necessary and sufficient condition for (1) and since d is the least
positive integer satisfying (1), it follows that
d=lcm(d1,d2).
As a result we have the following lemma.

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

}


We see that Lemma 2, 4, and 5 already give a complete formula for λ(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
\ordm(x)=λ(m).

}

{\bf Proof.}
Let m=p1k1prkr
be the prime factorization of m and let x be a solution of the congruence system
xgi(modpiki) for i=1,,r,
where gi are integers satisfying
\ordpiki(x)=λ(piki)
respectively (they exist by Lemma 2 and 1).
Such an x exists by the Chinese Remainder Theorem.
Then by Lemma 1,
λ(piki)=\ordpiki(x)\ordm(x) for all i=1,,r.
Hence
\ordm(x)lcm(λ(p1k1),,λ(prkr))=λ(m).

But \ordm(x) cannot exceed λ(m), so \ordm(x)=λ(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
\ordm(x)=d if and only if dλ(m).
}


{\bf Proof.}
If \ordm(x)=d for some x, then Lemma 1 implies dλ(m).

On the other hand, if dλ(m), let z be an integer with
\ordm(z)=λ(m)
(which exists by Lemma 6),
e=λ(m)/d, and x=ze.
Then
\ordm(x)=d because
xd=zed=zλ(m)1(modm)
and
\ordm(x)<d would imply
\ordm(z)<ed=λ(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 2k3n+5.
}

{\bf Solution.}
We will only discuss k3.
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
\ord2k(3)=λ(2k)=2k2.
However, since
\ord2k+1(3)=λ(2k+1)=2k1>2k2=\ord2k(3),
from Lemma 1 it follows that
3i+2k23i(mod2k)
but
3i+2k23i(mod2k+1)
and thus
3i+2k23i+2k(mod2k+1).
Hence, if 3i5(mod2k),
then either
3i5(mod2k+1)
or
3i+2k25(mod2k+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,
(2k)(3m+5),\\
http://www.mathlinks.ro/Forum/viewtopic.php?t=1912

\ei

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


%%%%%%%

posted on   Eufisky  阅读(170)  评论(0编辑  收藏  举报

编辑推荐:
· 开发者必知的日志记录最佳实践
· SQL Server 2025 AI相关能力初探
· Linux系列:如何用 C#调用 C方法造成内存泄露
· AI与.NET技术实操系列(二):开始使用ML.NET
· 记一次.NET内存居高不下排查解决与启示
阅读排行:
· Manus重磅发布:全球首款通用AI代理技术深度解析与实战指南
· 被坑几百块钱后,我竟然真的恢复了删除的微信聊天记录!
· 没有Manus邀请码?试试免邀请码的MGX或者开源的OpenManus吧
· 园子的第一款AI主题卫衣上架——"HELLO! HOW CAN I ASSIST YOU TODAY
· 【自荐】一款简洁、开源的在线白板工具 Drawnix
< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

导航

统计

点击右上角即可分享
微信分享提示