目 录何谓数论 1第1章 整数 51.1 数和序列 51.2 和与积 171.3 数学归纳法 241.4 斐波那契数 311.5 整除性 39第2章 整数的表示法和运算 472.1 整数的表示法 472.2 整数的计算机运算 572.3 整数运算的复杂度 64第3章 最大公因子 713.1 最大公因子及其性质 713.2 欧几里得算法 803.3 线性丢番图方程 90第4章 素数 994.1 素数概述 994.2 素数的分布 1114.3 算术基本定理 1294.4 因子分解方法和费马数 144第5章 同余 1555.1 同余概述 1555.2 线性同余方程 1685.3 中国剩余定理 1735.4 求解多项式同余方程 1825.5 线性同余方程组 1895.6 利用波拉德ρ方法分解整数 198第6章 同余的应用 2036.1 整除性检验 2036.2 万年历 2096.3 循环赛赛程 2146.4 散列函数 2166.5 校验位 220第7章 特殊的同余式 2297.1 威尔逊定理和费马小定理 2297.2 伪素数 2387.3 欧拉定理 248第8章 算术函数 2538.1 欧拉φ函数 2538.2 因子和与因子个数 2658.3 完全数和梅森素数 2718.4 莫比乌斯反演 2888.5 拆分 296第9章 密码学 3139.1 字符密码 3139.2 分组密码和流密码 3229.3 指数密码 3409.4 公钥密码学 3439.5 密码协议及应用 353第10章 原根 36510.1 整数的阶和原根 36510.2 素数的原根 37310.3 原根的存在性 37910.4 离散对数和指数的算术 38810.5 用整数的阶和原根进行 素性检验 40010.6 通用指数 407第11章 整数的阶的应用 41311.1 伪随机数 41311.2 埃尔伽莫密码系统 42311.3 电话线缆绞接中的一个应用 429第12章 二次剩余 43712.1 二次剩余与二次非剩余 43812.2 二次互反律 45412.3 雅可比符号 46612.4 欧拉伪素数 47612.5 零知识证明 485第13章 十进制分数与连分数 49313.1 十进制分数 49313.2 有限连分数 50613.3 无限连分数 51513.4 循环连分数 52813.5 用连分数进行因子分解 543第14章 非线性丢番图方程与 椭圆曲线 54714.1 毕达哥拉斯三元组 54814.2 费马大定理 55614.3 平方和 57214.4 佩尔方程 58414.5 同余数和椭圆曲线 59114.6 模素数椭圆曲线 60814.7 椭圆曲线的应用 617第15章 高斯整数 62515.1 高斯整数和高斯素数 62515.2 最大公因子和唯一因子分解 63615.3 高斯整数与平方和 647附录A 整数集公理 653附录B 二项式系数 657附录C Maple、Mathematica和SageMath 在数论中的应用 665C.1 Maple在数论中的应用 665C.2 Mathematica在数论中的应用 670C.3 SageMath在数论中的应用 677附录D 有关数论的网站 683附录E 表 685附录F 未解决问题精选 701参考文献 705ContentsWhat Is Number Theory 11 The Integers 51.1 Numbers and Sequences 51.2 Sums and Products 171.3 Mathematical Induction 241.4 The Fibonacci Numbers 311.5 Divisibility 392 Integer Representations and Operations2.1 Representations of Integers 472.2 Computer Operations with Integers 572.3 Complexity of Integer Operations 643 Greatest Common Divisors 713.1 Greatest Common Divisors and Their Properties 713.2 The Euclidean Algorithm 803.3 Linear Diophantine Equations 904 Prime Numbers 994.1 Prime Numbers 994.2 The Distribution of Primes 1114.3 The Fundamental Theorem of Arithmetic 1294.4 Factorization Methods and the Fermat Numbers 1445 Congruences 1555.1 Introduction to Congruences 1555.2 Linear Congruences 1685.3 The Chinese Remainder Theorem 1735.4 Polynomial Congruences 1825.5 Systems of Linear Congruences 1895.6 Factoring Using the Pollard Rho Method 1986 Applications of Congruences 2036.1 Divisibility Tests 2036.2 The Perpetual Calendar 2096.3 Round-Robin Tournaments 2146.4 Hashing Functions 2166.5 Check Digits 2207 Some Special Congruences 2297.1 Wilson‘s Theorem and Fermat’s Little Theorem 2297.2 Pseudoprimes 2387.3 Euler’s Theorem 2488 Arithmetic Functions 2538.1 The Euler Phi-Function 2538.2 The Sum and Number of Divisors 2658.3 Perfect Numbers and Mersenne Primes 2718.4 Mobius Inversion 2888.5 Partitions 2969 Cryptology 3139.1 Character Ciphers 3139.2 Block and Stream Ciphers 3229.3 Exponentiation Ciphers 3409.4 Public Key Cryptography 3439.5 Cryptographic Protocols and Applications 35310 Primitive Roots 36510.1 The Order of an Integer and Primitive Roots 36510.2 Primitive Roots for Primes 37310.3 The Existence of Primitive Roots 37910.4 Discrete Logarithms and Index Arithmetic 38810.5 Primality Tests Using Orders of Integers and Primitive Roots 40010.6 Universal Exponents 40711 Applications of the Order of an Integer 41311.1 Pseudorandom Numbers 41311.2 The ElGamal Cryptosystem 42311.3 An Application to the Splicing of Telephone Cables 42912 Quadratic Residues 43712.1 Quadratic Residues and Nonresidues 43812.2 The Law of Quadratic Reciprocity 45412.3 The Jacobi Symbol 46612.4 Euler Pseudoprimes 47612.5 Zero-Knowledge Proofs 48513 Decimal Fractions and Continued Fractions13.1 Decimal Fractions 49313.2 Finite Continued Fractions 50613.3 Infinite Continued Fractions 51513.4 Periodic Continued Fractions 52813.5 Factoring Using Continued Fractions 54314 Nonlinear Diophantine Equations and Elliptic Curves 54714.1 Pythagorean Triples 54814.2 Fermat’s Last Theorem 55614.3 Sums of Squares 57214.4 Pell’s Equation 58414.5 Congruent Numbers and Elliptic Curves 59114.6 Elliptic Curves Modulo Primes 60814.7 Applications of Elliptic Curves 61715 The Gaussian Integers 62515.1 Gaussian Integers and Gaussian Primes 62515.2 Greatest Common Divisors and Unique Factorization 63615.3 Gaussian Integers and Sums of Squares 647 Appendix A Axioms for the Set of Integers 653Appendix B Binomial Coefficients 657Appendix C Using Maple, Mathe-matica, and SageMath for Number Theory 665C.1 Using Maple for Number Theory 665C.2 Using Mathematica for Number Theory 670C.3 Using SageMath for Number Theory 677Appendix D Number Theory Web Links 683Appendix E Tables 685Appendix F Inventory of Unsolved Problems 701Bibliography 705