主题
Search

费马小定理


如果 p 是一个 素数 并且 a 是一个 自然数,则

 a^p=a (mod p).
(1)

此外,如果 pa (p 不整除 a),则存在一些最小的指数 d 使得

 a^d-1=0 (mod p)
(2)

并且 d 整除 p-1。 因此,

 a^(p-1)-1=0 (mod p).
(3)

该定理有时也简称为“费马定理”(Hardy 和 Wright 1979,第 63 页)。

这是 中国猜想 的推广和 欧拉定理 的特例。 它有时被称为费马素性检验,是素性的 必要 但非 充分 条件。 虽然费马可能已经证明了它(但未公开),但第一个证明是由欧拉在 1749 年发表的。 目前尚不清楚“费马小定理”这个术语何时首次被用于描述该定理,但 Hensel (1913) 在一本德语教科书中使用了它,并且出现在 Mac Lane (1940) 和 Kaplansky (1945) 的著作中。

该定理很容易通过对 a 进行数学 归纳 证明。 假设 p|a^p-a (即,p 整除 a^p-a)。 然后检查

 (a+1)^p-(a+1).
(4)

根据 二项式定理

 (a+1)^p=a^p+(p; 1)a^(p-1)+(p; 2)a^(p-2)+...+(p; p-1)a+1.
(5)

改写为,

 (a+1)^p-a^p-1=(p; 1)a^(p-1)+(p; 2)a^(p-2)+...+(p; p-1)a.
(6)

但是 p 整除右边,所以它也整除左边。 结合归纳假设,得到 p 整除总和

 [(a+1)^p-a^p-1]+(a^p-a)=(a+1)^p-(a+1),
(7)

如假设,因此该假设对于任何 a 都成立。 该定理有时被称为费马简单定理。威尔逊定理 是费马小定理的 推论

费马小定理表明,如果 p素数,则不存在一个基数 a<p,其中 (a,p)=1 使得 a^(p-1)-1 对模 p 具有非零余数。 如果存在这样的基数 a,则可以保证 p 是合数。 然而,费马小定理中非零余数的缺乏并不能保证 p素数。 明确地证明合数,同时通过一些 素数 的性质使得费马小定理成为一个 合数性检验,有时称为 费马合数性检验。 对于某些非平凡基数满足费马小定理并且未知为合数的数称为 可能素数

合数 被称为 费马伪素数(或有时简称为“伪素数”),对于某些 as 具有零余数,因此未被识别为合数。 更糟糕的是,存在被称为 卡迈克尔数 的数字(其中最小的是 561),对于任何选择与 p 互质 的基数 a 都给出零余数。 然而,费马小定理的逆定理 提供了一个证明数字素性的标准。 下表列出了前 100 个基数 a 的最小 伪素数 P(OEIS A007535;Beiler 1966,第 42 页,勘误已更正)。

aPaPaPaPaP
234122694220562638291
391233343776334183105
4152425444564658485
5124252845766511285129
63526274613366918687
7252765476567858791
892845484968698891
9282935496669858999
103330495051701699091
1115314951657110591115
12653233528572859293
1321338553657311193301
14153435545574759495
1534135515563759195141
165136915657767796133
1745374557657724797105
1825383958133783419899
194539955987799199145
20214091603418081100153
21554110561918185

另请参阅

二项式定理, 卡迈克尔数, 中国猜想, 合数, 合数性检验, 欧拉定理, 费马小定理的逆定理, 费马伪素数, 模乘法群, 普拉特证书, 素性测试, 素数, 伪素数, 互质, 总计函数, 维费里希素数, 威尔逊定理, 证人

使用 Wolfram|Alpha 探索

参考文献

Ball, W. W. R. 和 Coxeter, H. S. M. Mathematical Recreations and Essays, 13th ed. New York: Dover, p. 61, 1987.Beiler, A. H. Recreations in the Theory of Numbers: The Queen of Mathematics Entertains. New York: Dover, 1966.Conway, J. H. 和 Guy, R. K. The Book of Numbers. New York: Springer-Verlag, pp. 141-142, 1996.Courant, R. 和 Robbins, H. "Fermat's Theorem." §2.2 in Supplement to Ch. 1 in What Is Mathematics?: An Elementary Approach to Ideas and Methods, 2nd ed. Oxford, England: Oxford University Press, pp. 37-38, 1996.Flannery, S. 和 Flannery, D. In Code: A Mathematical Journey. London: Profile Books, pp. 118-125, 2000.Hardy, G. H. 和 Wright, E. M. An Introduction to the Theory of Numbers, 5th ed. Oxford, England: Clarendon Press, 1979.Hensel, K. Zahlentheorie. Berlin: G. J. Göschen, 1913.Kaplansky, I. "Lucas's Tests for Mersenne Numbers." Amer. Math. Monthly 52, 188-190, 1945.Mac Lane, S. "Modular Fields." Amer. Math. Monthly 47, 259-274, 1940.Nagell, T. "Fermat's Theorem and Its Generalization by Euler." §21 in Introduction to Number Theory. New York: Wiley, pp. 71-73, 1951.Séroul, R. "The Theorems of Fermat and Euler." §2.8 in Programming for Mathematicians. Berlin: Springer-Verlag, p. 15, 2000.Shanks, D. Solved and Unsolved Problems in Number Theory, 4th ed. New York: Chelsea, p. 20, 1993.Sloane, N. J. A. Sequence A007535/M5440 in "The On-Line Encyclopedia of Integer Sequences."

请引用为

Weisstein, Eric W. “费马小定理。” 来自 MathWorld--一个 Wolfram Web 资源。 https://mathworld.net.cn/FermatsLittleTheorem.html

学科分类