Selected Chapters from Number Theory and Algebra

Similar documents
Favorite Topics from Complex Arithmetic, Analysis and Related Algebra

Introduction to Number Theory

NUMBER SYSTEMS. Number theory is the study of the integers. We denote the set of integers by Z:

Math 118: Advanced Number Theory. Samit Dasgupta and Gary Kirby

8 Primes and Modular Arithmetic

10 Problem 1. The following assertions may be true or false, depending on the choice of the integers a, b 0. a "

Lecture 5: Arithmetic Modulo m, Primes and Greatest Common Divisors Lecturer: Lale Özkahya

Table of Contents. 2013, Pearson Education, Inc.

ECEN 5022 Cryptography

Definition 6.1 (p.277) A positive integer n is prime when n > 1 and the only positive divisors are 1 and n. Alternatively

Summary Slides for MATH 342 June 25, 2018

PUTNAM TRAINING NUMBER THEORY. Exercises 1. Show that the sum of two consecutive primes is never twice a prime.

An integer p is prime if p > 1 and p has exactly two positive divisors, 1 and p.

M381 Number Theory 2004 Page 1

MATH 4400 SOLUTIONS TO SOME EXERCISES. 1. Chapter 1

TC10 / 3. Finite fields S. Xambó

A Guide to Arithmetic

INTEGERS. In this section we aim to show the following: Goal. Every natural number can be written uniquely as a product of primes.

This is a recursive algorithm. The procedure is guaranteed to terminate, since the second argument decreases each time.

7. Prime Numbers Part VI of PJE

Chapter 3 Basic Number Theory

CHAPTER 6. Prime Numbers. Definition and Fundamental Results

Chapter 5. Number Theory. 5.1 Base b representations

Math Circle Beginners Group February 28, 2016 Euclid and Prime Numbers Solutions

SOLUTIONS TO PROBLEM SET 1. Section = 2 3, 1. n n + 1. k(k + 1) k=1 k(k + 1) + 1 (n + 1)(n + 2) n + 2,

Introduction to Abstract Mathematics

7.2 Applications of Euler s and Fermat s Theorem.

Beautiful Mathematics

Number Theory Proof Portfolio

Gaussian integers. 1 = a 2 + b 2 = c 2 + d 2.

32 Divisibility Theory in Integral Domains

E.J. Barbeau. Polynomials. With 36 Illustrations. Springer

ENTRY NUMBER THEORY. [ENTRY NUMBER THEORY] Authors: Oliver Knill: 2003 Literature: Hua, introduction to number theory.

PRACTICE PROBLEMS: SET 1

Lecture notes: Algorithms for integers, polynomials (Thorsten Theobald)

The Impossibility of Certain Types of Carmichael Numbers

198 VOLUME 46/47, NUMBER 3

NOTES ON SIMPLE NUMBER THEORY

Discrete Logarithms. Let s begin by recalling the definitions and a theorem. Let m be a given modulus. Then the finite set

586 Index. vertex, 369 disjoint, 236 pairwise, 272, 395 disjoint sets, 236 disjunction, 33, 36 distributive laws

Part II. Number Theory. Year

ALGEBRA. 1. Some elementary number theory 1.1. Primes and divisibility. We denote the collection of integers

A. Algebra and Number Theory

Number Theory. Henry Liu, 6 July 2007

Wilson s Theorem and Fermat s Little Theorem

Basic elements of number theory

Course 2316 Sample Paper 1

Basic elements of number theory

Public-key Cryptography: Theory and Practice

Elementary Number Theory Review. Franz Luef

MATH 361: NUMBER THEORY FOURTH LECTURE

Definitions. Notations. Injective, Surjective and Bijective. Divides. Cartesian Product. Relations. Equivalence Relations

On Anti-Elite Prime Numbers

1. multiplication is commutative and associative;

MATH 310: Homework 7

MATH 145 Algebra, Solutions to Assignment 4

1 Overview and revision

Algebra for error control codes

Elementary Number Theory MARUCO. Summer, 2018

LARGE PRIME NUMBERS (32, 42; 4) (32, 24; 2) (32, 20; 1) ( 105, 20; 0).

PMA225 Practice Exam questions and solutions Victor P. Snaith

LECTURE NOTES IN CRYPTOGRAPHY

Number Theory Solutions Packet

An Algorithm for Prime Factorization

Numbers and their divisors

CPSC 467b: Cryptography and Computer Security

CS 5319 Advanced Discrete Structure. Lecture 9: Introduction to Number Theory II

Ma/CS 6a Class 2: Congruences

FERMAT S TEST KEITH CONRAD

THE MILLER RABIN TEST

11 Division Mod n, Linear Integer Equations, Random Numbers, The Fundamental Theorem of Arithmetic

Elementary Algebra Chinese Remainder Theorem Euclidean Algorithm

Course MA2C02, Hilary Term 2013 Section 9: Introduction to Number Theory and Cryptography

Course 2BA1: Trinity 2006 Section 9: Introduction to Number Theory and Cryptography

Number Theory. CSS322: Security and Cryptography. Sirindhorn International Institute of Technology Thammasat University CSS322. Number Theory.

Corollary 4.2 (Pepin s Test, 1877). Let F k = 2 2k + 1, the kth Fermat number, where k 1. Then F k is prime iff 3 F k 1

Number Theory Course notes for MA 341, Spring 2018

Contest Number Theory

Math Circle Beginners Group February 28, 2016 Euclid and Prime Numbers

Part IA Numbers and Sets

Exercises MAT2200 spring 2014 Ark 5 Rings and fields and factorization of polynomials

Ma/CS 6a Class 2: Congruences

THESIS. Presented in Partial Fulfillment of the Requirements for the Degree Master of Science in the Graduate School of The Ohio State University

Know the Well-ordering principle: Any set of positive integers which has at least one element contains a smallest element.

Solutions to Practice Final

Lecture 4: Number theory

MA257: INTRODUCTION TO NUMBER THEORY LECTURE NOTES

Discrete mathematics I - Number theory

Fermat s Little Theorem. Fermat s little theorem is a statement about primes that nearly characterizes them.

EXAMPLES OF MORDELL S EQUATION

PRIMALITY TEST FOR FERMAT NUMBERS USING QUARTIC RECURRENCE EQUATION. Predrag Terzic Podgorica, Montenegro

Math 511, Algebraic Systems, Fall 2017 July 20, 2017 Edition. Todd Cochrane

p = This is small enough that its primality is easily verified by trial division. A candidate prime above 1000 p of the form p U + 1 is

A FIRST COURSE IN NUMBER THEORY

Finite Fields and Error-Correcting Codes

Homework #2 solutions Due: June 15, 2012

On the Prime Divisors of Odd Perfect Numbers

MATH 310 Course Objectives

Factorization in Polynomial Rings

Transcription:

Selected Chapters from Number Theory and Algebra A project under construction Franz Rothe Department of Mathematics University of North Carolina at Charlotte Charlotte, NC 83 frothe@uncc.edu December 8, 01 Allnumalg\numalg.tex Contents I Number Theory 3 1 Euclid s Number Theory 4 1.1 The Euclidean algorithm.......................... 4 1. How many owl-primes are there?..................... 7 1.3 Prime numbers............................... 9 1.4 Rational and irrational........................... 1 Fermat Primes 13.1 A short paragraph about Fermat numbers................ 13. More about Fermat numbers....................... 14.3 Pseudo random Number Generation....................4 Pseudo prime and Carmichael numbers.................. 1

3 Arithmetic of the Complex Numbers 6 3.1 Arctan identities............................... 6 3. Gaussian primes................................ 7 3.3 Sums of two squares............................. 31 3.4 Roots..................................... 36 3.5 The solution of the reduced cubic equation................. 39 3.6 The square root of a complex number.................... 43 3.7 Pythagorean triples.............................. 44 3.8 Roots of unity................................. 47 II Algebra 55 1 Polynomials 55 1.1 Rational zeros of polynomials........................ 55 1. Gauss Lemma................................ 56 1.3 Eisenstein s irreducibility criterium..................... 60 1.4 Descartes Rule of Signs........................... 63 Tschebychev polynomials 67 3 Polynomials over the Complex Numbers 71 3.1 A proof of the Fundamental Theorem of Algebra.............. 71 3. Meditation on Descartes rule of signs.................... 7 3.3 Estimation of zeros with Rouché s Theorem................ 77 3.4 Perron s irreducibility criterium....................... 78 3.5 The limiting case............................... 79 4 The Residue Theorem and its Consequences 8 4.1 The residue theorem and the logarithmic residue theorem......... 8 4. Comparing two functions........................... 84

Part I Number Theory 3

1 Euclid s Number Theory 1.1 The Euclidean algorithm 10 Problem 1.1. Calculate the greatest common divisor of 765 and 567. Find integers s and t such that gcd (765, 567) = s 765 t 567. Answer. The extended Euclidean algorithms is used to calculate the greatest common divisor. In an additional parallel calculation, one gets the greatest common divisor as integer combination of the two given numbers. row 0: 1 0 row 1: 765 567 = 1 rem 198 0 1 row : 567 : 198 = rem 171 1 1 row 3: 198 : 171 = 1 rem 7 3 row 4: 171 : 7 = 6 rem 9 3 4 row 5: 7 : 9 = 3 rem 0 0 7 row 5+1: 63 85 Indeed, gcd (765, 567) = 9 = ( 0) 765 + 7 567. Hence s = 0 and t = 7. Remark. The optional extra row 5 + 1 does not contain a division, only s M+1 and t M+1 are calculated. This is a convenient check, since 63 765 85 567 = 0. 10 Problem 1.. Use the last problem to calculate the least common multiple lcm (765, 567). Answer. lcm (765, 567) = 765 10 Problem 1.3. Given that Find the smallest positive solution for x. 567 = 765 63 = 48 195 gcd (765, 567) x 19 mod 765 and x 1 mod 567 Answer. One can determine the unknown integer x modulo the least common multiple of lcm (765, 567). To get a solution, one needs p and q such that x = 19+p 765 = 1+q 567. Since 19 1 = is an integer, the congruence is solvable. We need to multiply the result 9 of the problem above by this integer and get 9 = ( 0) 765 + 7 567 18 = ( 40) 765 + 54 567 18 + 40 765 = 54 567 19 + 40 765 = 1 + 54 567 30 619 = 30 619 4

We get a solution x = 30 619, which turns out to be the smallest one, in this example. 1 10 Problem 1.4. Calculate the greatest common divisor of 367 and 47. Find integers s and t such that gcd (367, 47) = s 367 + t 47. Answer. The extended Euclidean algorithms is used to calculate the greatest common divisor. In an additional parallel calculation, one gets the greatest common divisor as integer combination of the two given numbers. Here is the example: row 0: 1 0 row 1: 367 : 47 = 7 rem 3 0 1 row : 47 : 38 = 1 rem 9 1 7 row 3: 38 : 9 = 4 rem 1 8 row 4: 9 : = 4 rem 1 5 39 row 5: : 1 = rem 0 1 164 row 5+1: 47 367 Indeed, gcd (367, 74) = 1 = ( 1) 367 + 164 47. The optional extra row 5 + 1 does not contain a division, only s M+1 and t M+1 are calculated. This is a convenient check, since 47 367 367 47 = 0. 10 Problem 1.5. Find integers s and t such that s + 8t =. Find the least common multiple of 8 and. Answer. One can get immediately gcd (, 8) =. Hence the least common multiple of and 8 is 88. The extended Euclidean algorithm gives the greatest common divisor as linear combination: Indeed, gcd (, 8) = = ( 1) + 3 8. 10 Problem 1.6. Given that row 0: 1 0 row 1: : 8 = rem 6 0 1 row : 8 : 6 = 1 rem 1 row 3: 6 : = 3 rem 0 1 3 x 3 mod 8 and x 5 mod determine the unknown integer x modulo the least common multiple of 8 and. Answer. One needs s and t such that 3 + 8s = 5 + t. This works for 3 + 8 3 = 5 + 1 = 7. Hence both more. x 7 mod 8 and x 7 mod what implies x 7 mod 88 1 One does not always get immediately the smallest solution. The values p and q are not needed any 5

10 Problem 1.7. Calculate and prime factor the number 15 1 ( 3 1)( 5 1). Answer. ( p 1) is always a divisor of ( p q 1 for any p and q. The prime factoring is [ ] 3 767 15 1 ( 3 1)( 5 1) = 7 31 7 31 1 = 7 31 150 = 3 5 7 31 = 3 550 Proposition 1.1 (Euclid s Lemma). If a prime number divides the product of two integers, the prime number divides at least one of the two integers. Proof. Let p be the prime number, and the integers a and b. We assume that p divides the product ab, but p does not divide a. We need to show that p divides b. Because p does not divide a, we get gcd (a, p) = 1. By the extended Euclidean algorithm, there exist integers s, t such that 1 = sa + tp Hence b p = sab p + tb Because p divides ab, the right hand side is an integer. Hence p divides b, as to be shown. 10 Problem 1.8. Prove that a nonconstant integer polynomial assumes infinitely many composite values P (n), for appropriately chosen natural numbers n. Proposition 1.. A nonconstant integer polynomial assumes infinitely many composite values P (n), for appropriately chosen natural numbers n. Proof. Let d 1 be the degree of the given polynomial. By the fundamental theorem of algebra, the polynomial P can assume any value at most d times. Hence there exist at most 3d natural numbers n for which P (n) is either 0, 1 or 1. Let a be natural number such that P (a) 0, ±1. Let p be any prime factor of P (a) and put P (a) = pq. It is easy to see that for all integer k, the difference P (a + kp) P (a) is divisible by p. Indeed, this follows by the binomial theorem. For any given polynomial with integer coefficients c l d P (x) = c l x l P (a + kp) P (a) = = l=0 d [ c l (a + kp) l a l] l=0 d l=0 P (a + kp) P (a) = p m c l l j=1 ( ) [ d l a l j (kp) j = p c l j l=0 l j=1 ( ] l )a l j k j p j 1 j Indeed, we only need to know for this proof that any value can be assumed at most as many times as the degree of the polynomial. 6

where m is an integer abbreviating the last double sum. Since P (a) = pq, we conclude P (a + kp) = p(m + q) is divisible by p for all integer k. There exist at most 3d integers k for which P (a + kp) is either 0, p or p. Hence there exist infinitely many integers k such that a + kp 0 and P (a + kp) 0, ±p is divisible by p and hence composite. 1. How many owl-primes are there? The values of the polynomial n n + 41 for n = 1,, 3,... 40 all turn out to be primes. This curious observation goes back to Euler. 10 Problem 1.9. As a warm-up, find the three smallest primes larger than 41 which are not in the list of 40 primes just mentioned. Answer. These are the first three primes not in the range: 59, 67, 73 n n + 41 for any natural number n. We now address the question which other primes besides 41 have the curious property noted by Euler. Definition 1.1 (Owl-prime). I call a prime p an owl-prime 3 if the values of the polynomial n n + p for n = 1,, 3,... p 1 all turn out to be primes. 10 Problem 1.10. As a warm-up, find the three smallest owl-primes. Now we have the obvious question: are there further owl-primes between 5 and 41? Proposition 1.3. For any prime p > 5 equivalent are (a) For any natural number n, the values n n + p are divisible neither by, 3 nor 5. (b) p is congruent to either 11 or 17 modulo 30. Remark. Note this proposition gives only a necessary condition for a prime being an owl-prime. Reason. Clearly n n + p is odd since n n is always even, and every prime p > is odd. If we go through the natural numbers n = 1,, 3,..., the value of n n is either divisible by three, or it is congruent to modulo 3. The first case occurs for n 0 or n 1 modulo 3. The second case occurs for n mod 3. To assure that n n + p is never divisible by 3 for any n, we need to have p mod 3. From the following small table, we get the possible values of n n mod 5 and n n mod 7: 3 I have chosen this name in honest of Euler 7

n n n n n mod 5 n n mod 7 1 0 0 0 3 5 3 6 4 1 4 1 3 5 0 0 1 6 30 0 5 7 4 3 0 We see 0, 3, 4 are the possible values of n n mod 5. To avoid that n n + p is divisible by 5, we need that n n and p are different modulo 5. Hence p has to be congruent to either 1 or modulo 5. 10 Problem 1.11. If a number p is odd, p mod 3, and p 1 mod 5, determine the number p modulo 30. Similarly, assume p is odd, p mod 3, and p mod 5, and determine p modulo 30. Answer. In the first case, we get p 11 mod 30. In the second case, we get p 17 mod 30. 10 Problem 1.1. Find the next two owl-primes larger than 5. p. 10 Problem 1.13. What are the values possible for p mod 7 of an owl-prime Answer. We have already obtained the possible values of n n mod 7 are 0, 1,, 5. Let p > 7 be any prime. To avoid that n n + p is divisible by 7, we need that n n and p are different modulo 7. Hence p has to be congruent to either 3, 4 or 6 modulo 7. From the last remark, we already see that 47 is not an owl-prime. Indeed, 7 divides n n + 47 for n = since both 47 5 mod 7 and 5 mod 7. Open Problem. Show that, 3, 5, 11, 17 and 41 are the only owl-primes, or find a larger owl-prime. 8

1.3 Prime numbers Proposition 1.4 (Euclidean Property). If a number c divides the product ab and gcd (c, a) = 1, then c divides b. Standard proof. By the extended Euclidean algorithm, there exist integers s, t such that 1 = sa + tc b c = sab c + tb The second line results by multiplication of both sides with b. Because c divides ab, the c right hand side is an integer. Hence c divides b, as to be shown. Second proof. Both numbers a and c are divisors of both products ab and ac. Hence both a and c are divisors of the greatest common divisor Hence the integer G := gcd (ab, ac) (1.1) q := ac G is a divisor of both a and c. Hence q is a divisor of gcd (a, c) = 1, which was assumed to be one. Hence q = 1, and ac = G is a divisor of ab. This implies that c is a divisor of b, as to be shown. Definition 1. (prime number). A prime number is an integer p, which is divisible only by 1 and itself. Euclid and many other mathematicians have shown that there exist infinitely many prime numbers. We put them into the increasing sequence p 1 =, p = 3, p 3 = 5, p 4 = 7,... It is rather easy to see that for every positive integer, there exists a decomposition into prime factors. Let a and b be any positive integers. There exist sequence α i 0 and β i 0, with index i = 1,,... and only finitely many terms nonzero such that (1.) a = p α i i, b = p β i i i 1 i 1 The uniqueness of the prime decomposition turns out harder to prove. Astonishingly, the proof depends on Euclid s lemma, the proof of which in turn relies on the extended Euclidean algorithm. 9

Proposition 1.5 (Euclid s Lemma). If a prime number divides the product of two integers, the prime number divides at least one of the two integers. Reason. Let p be the prime number, and the integers be a and b. We assume that p divides the product ab, but p does not divide a. We need to show that p divides b. Because p does not divide a, the definition of a prime number implies gcd (a, p) = 1. By the extended Euclidean algorithm, there exist integers s, t such that 1 = sa + tp Hence b p = sab p + tb Because p divides ab, the right hand side is an integer. Hence p divides b, as to be shown. Proposition 1.6 (Monotonicity). Let a and b have the prime decompositions (1.3) a = p α i i, b = p β i i i 1 i 1 The number b is a divisor of a if and only if β i α i for all i 1. Reason. If β i α i for all i 1, then a = qb with q = i 1 p α i β i i and hence b is a divisor of a. Conversely, assume that b is a divisor of a. We need to show that β i α i for all i 1. Proceed by induction on b. If b = 1, then β i = 0 for all i 1, and the assertion is true. Here is the induction step b < n b = n : Let p i be any prime factor of b, which means that β i 1. Because p i divides b and b divides a, the prime p i divides a. By Euclid s Lemma Proposition 1.5, p i is a divisor of one of the primes p j occurring in the prime decomposition of a. Hence α j 1. Because different primes cannot divide each other, this implies i = j and p i = p j. Hence b p j < n is a divisor of a p j. By the induction assumption, this implies β i α i for all i j, as well as β j 1 α j 1 and hence β i α i for all i 1. Proposition 1.7 (Uniqueness of prime decomposition). The prime decomposition of any positive integer is unique. Reason. Assume a = p α i i and a = p β i i i 1 i 1 Because a divides a, the fact given above both tells that β i α i and α i β i for all i 1. Hence β i = α i for all i 1. 10

Proposition 1.8. Let a and b have the prime decompositions (1.3). The prime decompositions of the greatest common divisor and least common multiple are (1.4) (1.5) gcd (a, b) = i 1 lcm (a, b) = i 1 p min[α i,β i ] i p max[α i,β i ] i 10 Problem 1.14. Check these formulas for a = 1001, b = 41. Proof of Proposition 1.8. Let g be the righthand side of equation (1.5). check properties (i) and (ii) defining the greatest common divisor. We need to (i) g divides both a and b. Check. This is clear, because both min[α i, β i ] α i and min[α i, β i ] β i for all i 1. (ii) If any positive integer h divides both a and b, then h divides the greatest common divisor g. Check. Let (1.6) h = i 1 p γ i i be the prime decomposition of h. Because h divides both a and b, monotonicity implies that both γ i α i and γ i β i for all i 1. Hence γ i min[α i, β i ] for all i 1, which easily implies that h is a divisor of g. Let l be the righthand side of equation (1.5). We need to check properties (i) and (ii) defining the least common multiple. (i) The number l is a multiple of both a and b. Check. This is clear, because both max[α i, β i ] α i and max[α i, β i ] β i for all i 1. (ii) If any positive integer k is a multiple of both a and b, the integer k is a multiple of the least common multiple l. 11

Check. Let (1.7) k = i 1 p γ i i be the prime decomposition of k. Because k is a multiple of both a and b, monotonicity implies that both γ i α i and γ i β i for all i 1. Hence γ i max[α i, β i ] for all i 1, which easily implies that k is a multiple of l. 1.4 Rational and irrational Proposition 1.9. For any natural numbers r 1 and a 1, the r-th root r a is only a rational number if it is even an integer. Proof. The assertion is clear for r = 1 or a = 1, hence we may assume r and a. Now assume that r a = m n n r a = m r with natural m, n. We show that any prime number p dividing n has to divide m, too. Hence after cancelling common factors, we get n = 1, and hence the root is an integer. Now assume that the prime p divides n. Hence p r divides n r, which in turn divides an r = m r. Hence p r divides m r. Hence, by Euclid s Lemma p divides m, as claimed. As already explained, the assertion follows. Proposition 1.10. For any natural numbers r and any a, which is not the r-th power of an integer, the root r a is irrational. Especially, the roots of the primes are all irrational. Proof. If the root r a is rational, it is even an integer m, and hence a = m r is the r-th power of m. Take the contrapositive: If a is not the r-th power of an integer, the root r a is irrational. 1

Fermat Primes.1 A short paragraph about Fermat numbers Definition.1 (Fermat number, Fermat prime). The numbers F n = n + 1 for any integer n 0 are called Fermat numbers. A Fermat number which is prime is called a Fermat prime. Lemma.1 (Fermat). If p is any odd prime, and p 1 is a power of two, then p = F n is a Fermat prime. Proof. Assume p = 1 + a and a 3 odd. Because of the fatorization a = n (b + 1) one can factor p = 1 + n (b+1) = (1 + n )(1 n + n + n b ) If p is an odd prime, the only possibility is b = 0 and p = F n. The only known Fermat primes are F n for n = 0, 1,, 3, 4. They are 3, 5, 17, 57, and 65537, see 4. Fermat numbers and Fermat primes were first studied by Pierre de Fermat, who conjectured 1654 in a letter to Blaise Pascal that all Fermat numbers are prime, but told he had not been able to find a proof. Indeed, the first five Fermat numbers are easily shown to be prime. However, Fermat s conjecture was refuted by Leonhard Euler in 173 when he showed, as one of his first number theoretic discoveries: F 5 = 5 + 1 = 3 + 1 = 49496797 = 641 6700417. Later, Euler proved that every prime factor p of F n must have the form p = i n+1 + 1. Almost hundred years later, Lucas showed that even p = j n+ + 1. These results give a vague hope that one could factor Fermat numbers and perhaps settle Fermat s conjecture to the negative. There are no other known Fermat primes F n with n > 4. However, little is known about Fermat numbers with large n. In fact, each of the following is an open problem: 1. Is F n composite for all n > 4? By this anti-fermat hypothesis 3, 5, 17, 57, and 65537 would be the only Fermat primes.. Are there infinitely many Fermat primes? (Eisenstein 1844) 3. Are there infinitely many composite Fermat numbers? 4 sequence A019434 in OEIS 13

4. Are all Fermat numbers square free? As of 01, the next twenty-eight Fermat numbers, F 5 through F 3, are known to be composite. As of February 01, only F 0 to F 11 have been completely factored. For complete information, see Fermat factoring status by Wilfrid Keller, on the internet at http://ww.prothsearch.net/fermat.html Main Theorem (Gauss-Wantzel Theorem). A regular polygon with n sides is constructible if and only if n = h p 1 p p s where p p s is a product of different Fermat primes. If the anti-fermat hypothesis is true, there are exactly five Fermat primes, and hence exactly 31 regular constructible polygons with an odd number of sides. n factored 1 3 F 0 5 F 1 3 15 3 5 4 17 F 5 51 3 17 6 85 5 17 7 55 3 5 17 8 57 F 3 9 771 3 57 10 1 85 5 57 11 3 855 3 5 57 1 4 369 17 57 13 13 107 3 17 57 14 1 845 5 17 57 15 65 535 3 5 17 57 16 65 537 F 4 n factored 17 196 611 3 65 537 18 37 685 5 65 537 19 983 055 3 5 65 537 0 1 114 19 17 65 537 1 3 34 387 3 17 65 537 5 570 645 5 17 65 537 3 16 711 935 3 5 17 65 537 4 16 843 009 57 65 537 5 50 59 07 3 57 65 537 6 84 15 045 5 57 65 537 7 5 645 135 3 5 57 65 537 8 86 331 153 17 57 65 537 9 858 993 459 3 17 57 65 537 30 1 431 655 765 5 17 57 65 537 31 4 94 967 95 3 5 17 57 65 537. More about Fermat numbers 10 Problem.1. Prove by induction that F 0 F 1 F n 1 = F n for all natural numbers n 1. Answer. Basic step: For n = 1, both sides of the formula are equal to 3, since 3 = F 0 = F 1 = 5. 14

Induction step n n + 1 : The formula is assumed to hold for n as written. It is shown for n replaced by n + 1, as follows: F 0 F 1 F n = [F 0 F 1 F n 1 ] F n by recursive definition of the product = (F n )F n by the induction assumption = ( n 1 ) ( n + 1 ) = ( n ) 1 = n+1 1 = F n+1 We have checked the asserted formula step for n + 1. From the basic step and the induction step together, we conclude by the principle of induction that the formula holds for all n 1. 10 Problem.. Use the last problem to conclude Goldbach s Theorem, which states that any two different Fermat numbers are relatively prime. Conclude there exist infinitely many primes. Answer. Assume that p is a common prime factor of the Fermat numbers F k and F n with 0 k < n. We could conclude that p is a divisor of F 0 F 1 F n 1 = F n, and hence of both F n and of F n. This is only possible for p =. But all Fermat numbers are odd and cannot have divisor. This argument excludes that any two Fermat numbers have a common prime factor. For any natural number n, let p n be the smallest (or any) prime factor of F n. The primes p n are all different since the Fermat numbers are relatively prime. Hence there exist infinitely many primes. Corollary. In any arithmetic sequence 1 + i k with i = 1,, 3,... there exist infinitely many primes. Reason. Any prime factor of F n has the form p n = 1+i n+. Hence all p n with n k are contained in the arithmetic sequence 1 + i k with i = 1,, 3,.... Proposition.1 (Euler 1770). Any prime factor of the Fermat number F n has the form p n = 1 + i n+1. Reason. Assume that p is a prime factor of the Fermat number F n. Let h > 1 be the smallest integer such that h 1 mod p. This power h is also called the order of modulo p. The definition of F n implies n 1 mod F n and n+1 1 mod F n n 1 mod p and n+1 1 mod p Since h is a divisor of n+1 but not n, we get h = n+1. Fermat s Little Theorem implies p 1 1 mod p, and hence h is a divisor of p 1. Together we conclude that n+1 is a divisor of p 1, as to be shown. It took more than hundred years, until Édouard Lucas improved Euler s result. 15

Proposition. (Lucas 1878). Any prime factor of the Fermat number F n with n has the form p n = 1 + j n+. Reason. We continue the reasoning from Euler s Proposition.1. Assume that p is a prime factor of the Fermat number F n and n. As a consequence of Euler s Proposition, we see that 8 is a divisor of p 1. Hence one can calculate the Legendre symbol ( ) = ( 1) (p 1)(p+1) 8 = 1 p and one gets from Euler s criterium p 1 ( ) = 1 mod p p Hence the order h = n+1 of modulo p is actually a divisor of (p 1)/. In the end we conclude that n+ is a divisor of p 1, as to be shown. Remark. It turns out occur many times that the Fermat number F n has a prime factor 1 + j n+ with j odd. This is known to happen for n = 5, 6, 7, 9, 10, 11, 1, 15, 17, 18, 19, 1, 3, 5, 7, 9, 30, 31, 3 and many more cases with n 33. In this sense, Lucas result turns out to be optimal. On the other hand, F 8 has no prime factor with j odd. Theorem.1 (Pépin s test (1877)). For n 1, the Fermat number F n is prime if and only if 3 (Fn 1)/ 1 mod F n In 1905 and 1909, J.C. Morehead and A.E.Western used Pépins test to prove that F 7 and F 8 are composite. As of 001, no factor is known for the Fermat numbers F n with n = 14, 0,, 4. These numbers were proved composite only with Pépin s test. Here is a proof and some results related to this test. Proposition.3 (Sufficiency of a Pépin-like test). Assume there exists a natural number a such that a (Fn 1)/ 1 mod F n Then the Fermat number F n is prime. Proof. The assumption implies (.1) a (Fn 1)/ 1 mod F n and a Fn 1 1 mod F n 16

Let p be any prime factor of the Fermat number F n. Let h > 1 be the smallest integer such that a h 1 mod p. Since the congruences (.1) hold modulo p, too, we see that h divides F n 1 but not (F n 1)/, and hence h = F n 1. The Little Fermat Theorem implies a p 1 1 mod p and hence h is a divisor of p 1. We conclude Hence F n = p is a prime, as to be shown. 1 + h = F n p F n Lemma.. No matter whether F n is prime or not, the Jacobi symbols are ( ) ( ) Fn a = = 1 a for a = 3 and all n 1, as well as a = 5 and 7 for all n. The case a = 3, n 1. We calculate the Legendre symbol ( ) ( ) ( ) ( ) Fn 1 + n mod 3 1 + ( 1) n = = = (3 1)/ 1 mod 3 3 3 3 3 From the quadratic reciprocity for the Jacobi symbols we get, no matter whether F n is prime or not: ( ) ( ) ( ) 3 Fn = ( 1) (Fn 1)(3 1) Fn 4 = = 1 3 3 F n since F n 1 is divisible by 4. The case a = 5, n. We calculate the Legendre symbol ( ) ( ) ( ) ( ) Fn 1 + 4 n 1 mod 5 1 + ( 1) n 1 = = = (5 1)/ 1 mod 5 5 5 5 5 F n The case a = 7, n. The Legendre symbols obey the recurrence ( ) ( ) ( ) Fn 1 + 16 n mod 7 1 + n mod 7 = = = 7 7 7 ( Fn 7 ) 17

for all n, which allows an induction starting with ( ) ( ) 17 3 = 3 (7 1)/ 1 mod 7 7 7 ( ) 5 5 (7 1)/ 1 mod 7 7 From the quadratic reciprocity for the Jacobi symbols we get, no matter whether F n is prime or not: ( ) ( ) ( ) a Fn = ( 1) (Fn 1)(a 1) Fn 4 = = 1 a a F n since F n 1 is divisible by 4 and a = 5, 7 are odd. Proposition.4 (Necessity of a Pépin-like test). Assume the Fermat number F n is prime. Then a (Fn 1)/ 1 mod F n holds for a = 3 in the case n 1, and a = 5 and 7 in the case n. Proof. Because of the assumption that F n is prime, we can use Euler s criterium and get from Euler s criterium ( ) a Fn 1 Fn = 1 mod F n a as claimed. Theorem. (Lucas-Lehmer). Any number m is prime if and only if there exists a primarity witness. A witness is a natural number a with the following two properties: (i) a m 1 1 mod m; (ii) a (m 1)/p 1 mod m for all prime divisors p of m 1. If m = F n is a Fermat number, the only prime divisor of m 1 is the number. Thus we obtain sufficiency for the following Pépin-like test: Proposition.5 (A more general Pépin-like test). Assume there exists a natural number a such that a Fn 1 1 mod F n but a (Fn 1)/ 1 mod F n Then the Fermat number F n is prime. 18

Proof of the Lucas-Lehmer Theorem. The Theorem is true for m = because assumption (i) holds for a = 1, and assumption (ii) is an empty truth. Assume that a is a witness for m 3 and let h > 1 be the smallest integer such that a h 1 mod m. Assumption (i) yields that h is a divisor of m 1. By assumption (ii), we conclude h = m 1. Moreover, the witness a is relatively prime to m. The Euler-Fermat Theorem tells that a φ(m) 1 mod m where φ(m) is the Euler totient function. Hence the order h is a divisor of φ(m). The inequalities m 1 = h φ(m) m 1 imply φ(m) = m 1. Hence m is a prime number. Proth s Theorem is a slight generalization of Pépin s test. Theorem.3 (Proth s Theorem 1878). To test whether the number N is prime, one chooses a base a relatively prime to N for which the Jacobi symbol is ( a N ) = 1 Sufficient condition for primarity: k 1 + m. If Assume additionally that N = k m + 1 with (.) a (N 1)/ 1 mod N then N is prime. Necessary condition for primarity: No restriction on k needs to be assumed. If the above congruence (.) does not hold, then the number N is composite. Reason for the sufficient condition: Assume that p is a prime factor of the given number N. Let h > 1 be the smallest integer such that a h 1 mod p. The assumed congruence (.) implies that h is a divisor of N 1 = k m but not (N 1)/. The Little Fermat Theorem implies that h is a divisor of p 1. Hence we get the inequalities m h p 1 The assumption k 1 + m implies N m + m + 1 < (1 + m ). Hence N < 1 + m p N holds for each prime divisor of N. Since any composite number has a prime divisor less or equal its square root, this is only possible if N is a prime number. 19

The necessary condition. is a direct consequence of Euler s Theorem about the Legendre symbol. Here are some further less important remarks about Fermat numbers. Lemma.3. For any Fermat number F n 3, 5 Proof. By definition (Fn 1)/ 1 mod F n n 1 mod F n and n 1 mod F n For all n we know that n + 1 1 + n and hence n+1 = n 1+n = (F n 1)/ n (Fn 1)/ 1 mod F n Lemma.4. For any Fermat number F n 3, 5, 17 Proof. Just calculate: F (Fn 1)/ n 1 1 mod F n F n 1 = (1 + n 1 ) = 1 + n 1 + n 1+n 1 F (Fn 1)/ n 1 (1+n 1 )(F n 1)/4 mod F n mod F n Since n 3, we know that n n 4 + n and hence hence n = n+1 (1 + n 1 ) +n = (1 + n 1 )(F n 1)/4 n 1 mod F n implies (1+n 1 )(F n 1)/4 F (Fn 1)/ n 1 1 mod F n Lemma.5. Any Fermat number F n is a pseudo prime for the base as well as the base F n 1. In 1964, Rotkiewicz showed that the product of any number of prime or composite Fermat numbers will be a Fermat pseudo prime to the base. 0

Lemma.6. Let n > m. No matter whether the Fermat numbers are prime or not, the Jacobi symbols are ( ) ( ) Fn Fm = = 1 Proof. F m F n F n = 1 + n = 1 + ( m ) n m 1 + ( 1) n m mod F m for n > m. We calculate the Jacobi symbol ( ) ( ) Fn = = ( 1) (Fm 1)(Fm+1) 8 = 1 F m F m since F m 1 is divisible by 8 for m. From the quadratic reciprocity for the Jacobi symbols we get, no matter whether F n is prime or not: ( ) ( ) ( ) Fm Fn = ( 1) (Fn 1)(Fm 1) Fn 4 = = 1 F n F m F m again since F m 1 is divisible by 8 for m. Lemma.7. The number is not a primitive root of any Fermat prime except 3. If F n 3, 5, 17 is a Fermat prime, none of the Fermat numbers 17 F m < F n with m < n is a primitive roots modulo F n. Lemma.8. Any Fermat prime F n has (F n 1)/ primitive roots. Equivalent are: 1. r is a primitive root of F n.. r is a quadratic non-residue of F n. 3. r (Fn 1)/ 1 mod F n The primitive roots of any Fermat prime F n 3 are are r 3 9 j mod F n with j = 1,,..., (F n 1)/. 1

.3 Pseudo random Number Generation Very large Fermat primes are of particular interest in data encryption. (see Linear congruential generator, RANDU) Fermat primes are particularly useful in generating pseudo-random sequences of numbers in the range 1... N, where N is a power of. The most common method used is to take any seed value between 1 and P 1, where P is a Fermat prime. Now multiply this by a number A, which is greater than the square root of P and is a primitive root modulo P (i.e., it is not a quadratic residue). Then take the result modulo P. The result is the new value for the random number generator. V j+1 = (A V j ) mod P This procedure is useful in computer science since most data structures have members with X possible values. For example, a byte has 56 = 8 possible values 0... 55. Therefore to fill a byte (or any number of bytes, indeed) with random values, a random number generator which produces values 1 to 56 can be used, subtracting 1 from each output. This method produces only pseudo random values as, after P 1 repetitions, the sequence repeats. A poorly chosen multiplier A which is not a primitive root results in the sequence repeating sooner than P 1..4 Pseudo prime and Carmichael numbers Definition. (Pseudo prime and Carmichael number). Any number m for which (.3) a m 1 1 mod m is called a pseudo prime of base a. Any number m such that equation (.3) holds for all a relatively prime to m is called a Carmichael number. The Carmichael numbers are those which cannot be proved to be composite with the help of the Little Fermat Theorem if one agrees to use only basis a relatively prime to m. Lemma.9. Let a be any positive or negative integer. If k divides l, then a k 1 divides a l 1. Moreover gcd [a k 1, a l 1] = a gcd (k,l) 1 for any k and l. Proof. To check the first part, assume that l = ks. The geometric series with quotient q := a k yields a l 1 = q s 1 = (q 1)(1 + q + q + + q s 1 )

Hence a l 1 is divisible by a k 1 = q 1. We see from this first step that a gcd (k,l) 1 is a divisor of gcd [a k 1, a l 1]. The converse divisibility can be checked via the Euclidean algorithm. By the extended Euclidean algorithm, there exist natural numbers s and t such that sk tl = gcd (k, l) (possibly after switching k with l). Assume that d divides both a k 1 and a l 1. By the first part of the Lemma, the number d divides both a sk 1 and a tl 1, and hence their difference (a sk 1) (a tl 1) = (a sk tl 1)a tl = (a gcd (k,l) 1)a tl The base a and a tl are relatively prime to a k 1 and hence to d. Hence d divides a gcd (k,l) 1. Since this reasoning applies for any common divisor of a k 1 and a l 1, we conclude that gcd [a k 1, a l 1] is a divisor of a gcd (k,l) 1. Proposition.6. A number m is a pseudo prime with base a if and only if it has the following property: (*) if the prime power p s divides m, then p s divides a gcd (m 1,p 1) 1. Lemma.10. Especially, if a number m is a pseudo prime with base a and the prime power p s divides m, then p s divides a p 1 1. Sufficiency of (*). Assume that the base a satisfies the assumption (*). Let p s be any prime power dividing m and put g := gcd (p 1, m 1). Since g divides m 1, we conclude by the Lemma.9 that a g 1 divides a m 1 1. The assumption (*) tells that p s divides a g 1 and hence a m 1 1 by the Lemma.9. The simultaneous congruences a m 1 1 mod p s for all prime power divisors p s of m together imply a m 1 1 mod m. Necessity of (*). We assume that m is a pseudo prime with base a and thus a m 1 1 mod m. To check property (*), let p s be any prime power dividing m. This assumption implies a m 1 1 0 mod p s, too. The Euler-Fermat Theorem yields a φ(ps) 1 = a ps 1 (p 1) 1 0 mod p s. Hence a gcd (m 1,ps 1 (p 1)) 1 mod p s Since p is a divisor of m, it is not a divisor of m 1. Thus m 1 and p s 1 are relatively prime and hence gcd [m 1, p s 1 (p 1)] = gcd (m 1, p 1) Hence a gcd (m 1,p 1) 1 for all prime powers p s dividing m, as to be shown. mod p s Lemma.11. A Carmichael number cannot be divisible neither by any odd prime square nor by 4. 3

Proof. Assume that m is a Carmichael number and divisible by the prime power p s. By the second part of Proposition.11, we know that p s divides a p 1 1. We now show that it is impossible that any prime square divides m. Excluding the case p 3 is odd and s : In the case m that is divisible by an odd prime square, we choose a to be a primitive root modulo p, which we know to exist since p is odd. In that case p is not a divisor of a p 1 1, contradicting that p s divides a p 1 1. Excluding the special case p = and s : We need to exclude that m is divisible by 4. We choose a = 3. Now 4 is not a divisor of = a p 1 1, contradicting that p s divides a p 1 1. Proposition.7. Assume that the number m has the property (i) if the prime p divides m, then p 1 divides m 1; Assume furthermore that (a) the base a is relatively prime to m; (b) if the prime power p s divides m, then p s divides a p 1 1. Then m is a pseudo-prime of base a. Proof. Let p s be any prime power divisor of m. By assumption (b), p s divides a p 1 1. By assumption (i), p 1 divides m 1 and hence the Lemma.9 implies that a p 1 1 divides a m 1 1. Together we see that p s divides a m 1 1. The simultaneous congruences a m 1 1 mod p s for all prime power divisors p s of m together imply a m 1 1 mod m. Proposition.8. Assume assumption (i) from Proposition.7 holds for the composite number m = p s i i with different primes p i. The number of bases a for which the m is a pseudo prime is equal to A power of two is never a pseudo prime. 1 + (p i 1) Proof. For all odd prime factors p, we choose a primitive root r modulo p s. Choose any integers 0 t < p 1, not all zero. By the Chinese Remainder Theorem, the system of simultaneous congruences a r t ps 1 mod p s 4

for all prime factors p has a solution, unique modulo m. It is now easy to check by means of the Euler-Fermat Theorem that a satisfies the assumptions (a) and (b) of Proposition.7. Hence a is a base for the pseudo prime m. The procedure exhausts all possible choices of the bases a. Proposition.9. A number m is a Carmichael number if and only if it has the following two properties: (i) if the prime p divides m, then p 1 divides m 1; (ii) the number m is square free. Necessity. We assume that m is a Carmichael number and thus a m 1 1 mod m for all a relatively prime to m. To check property (i), let p 3 be any odd prime factor of m. We choose a to be a primitive root modulo p. By the Lemma.9 gcd [a m 1 1, a p 1 1] = a gcd (m 1,p 1) 1 By assumption a m 1 1 0 mod p and the Little Fermat Theorem yields a p 1 1 0 mod p. Hence a gcd (m 1,p 1) 1 mod p Since a is a primitive root, this implies gcd (m 1, p 1) = p 1. Hence p 1 is a divisor of m 1, confirming item (i). The property (ii) has been check above already. Sufficiency. Let a be any base relatively prime to m and p be a prime divisor of m. By the Little Fermat Theorem a prime p divides a p 1 1. Since we have assume that p 1 divides m 1, the Lemma.9 yields that a p 1 1 divides a m 1 1. Since m is assumed to be square free, the simultaneous congruences a m 1 1 mod p for all prime divisors p of m together imply a m 1 1 mod m, as claimed. Much more has been found out about Carmichael numbers. There exist only finitely Carmichael numbers with three prime factors which can be constructed. The remaining ones have at least four prime factors. Alford et. al. (1994) have proved that the number C(n) of Carmichael numbers less than n has the asymptotics C(n) n /7 for large n. Proposition.10. The Carmichael numbers with three prime factors are (6k + 1)(1k + 1)(18k + 1) were k has to be chosen such that all three factors are primes. 5

3 Arithmetic of the Complex Numbers Definition 3.1 (Gaussian integer ). A complex number with integer real- and imaginary part is called a Gaussian integer. 3.1 Arctan identities What is remarkable about the following products? (a) ( + i) (3 + i) = 5 + 5i (b) ( + i) (7 i) = 5 + 5i (c) (3 + i) (7 + i) = 50 + 50i (d) (5 + i) 4 (39 i) = 11444 + 11444i Each time, the real- and imaginary parts turn out to be equal. Do there exists more examples with this special property? For any positive x > 0, the principal argument of the complex number x + i is Arg (x + i) = arctan 1. Too, Arg (1 + i) = arctan 1 = π. Taking the arguments of the x 4 formulas (a) through (d), one gets: (a) (b) arctan 1 + arctan 1 3 = π 4 arctan 1 arctan 1 7 = π 4 (c) (d) arctan 1 3 + arctan 1 7 = π 4 4 arctan 1 5 + arctan 1 39 = π 4 Of course, left- and right-hand side of these formulas could still differ by an integer multiple of π. But it is clear that this cannot happen in the given four examples. Do there exist more similar formulas? Open Problem (May be difficult). How many solutions has the equation (3.1) c + 1 = N with natural numbers N and c? Open Problem (May be difficult). Are there more than four solutions to the equation (3.) M (c k + 1) = N with natural numbers N and M, and c k for k = 1,..., M? k=1 6

3. Gaussian primes It is straightforward to see that the Gaussian integers are a ring. The units in any ring are defined as its invertible elements. Clearly there are just four units 1, i, 1, i in the ring of Gaussian integers. Furthermore, division with remainder is possible. Hence the Euclidean algorithm works in the Gaussian integers. Consequently, any Gaussian integer can be decomposed uniquely into a product of irreducible elements unique up multiplication by the four units. Hence the Gaussian integers are a unique factorization domain, abbreviated UFD. The irreducible elements are called Theorem 3.1 (Gaussian primes). The Gaussian primes are: (a) the number 1 + i. (b) the usual primes p = 3, 7, 11, 19,... which are p 3 mod 4. (c) all pairs p + iq, p iq where p + q = r is a prime r 1 mod 4. Indeed, for every usual prime r = 5, 13, 17, 9,... which is r 1 mod 4 there exists a unique decomposition into a sum of two integer square. The decomposition r = p + q becomes unique by the additional requirement that the (negative or positive) integer p 1 mod 4 and q is even and positive. Here is a table with the smallest examples. Too, I list the squares a + ib = (p + iq). r p q a b 5 1 3 4 13 3 5 1 17 1 4 15 8 9 5 1 0 37 1 6 35 1 41 5 4 9 40 53 7 45 8 61 5 6 11 60 73 3 8 53 48 89 5 8 39 80 97 9 4 65 7 101 1 10 99 0 109 3 10 91 60 113 7 8 15 58 137 11 4 105 88 At that point, my heating system had been repaired, and I stopped. 10 Problem 3.1. Prove that there are infinitely many primes p 3 mod 4. 7

Answer. Let p 1,... p N be any primes congruent to 3 modulo 4. The number has the following properties: (a) P is odd. (b) P 3 mod 4. P := 1 + 4 (c) P is not divisible by p ν for any ν = 1... N. By (a) and (b), P cannot be the product of primes which are all congruent to 1 modulo 4. Hence there exists a prime p congruent to 3 modulo 4 dividing P. By item (c), this prime p is different from p 1,... p N. Hence there exist at least N + 1 different primes equivalent to 3 modulo 4. Since we know that such primes exist, there do exist infinitely many. 10 Problem 3.. Prove that there are infinitely many primes r 1 mod 4. Answer. Let r 1,... r N be any primes congruent to 1 modulo 4. Define the number P := 1 + 4 Indeed P has in the Gaussian integers the factoring [ ] [ ] N N P = 1 + i r ν 1 i r ν ν=1 Neither of the two factor is divisible by 1 + i nor any prime p 1 mod 4. Hence we get the following properties: (a) P is odd. (b) P 1 mod 4. (c) P is not divisible by r ν for any ν = 1... N. N ν=1 N ν=1 (d) P is not divisible by any prime p 3 mod 4. By (a) and (d), P is the product of primes congruent to 1 modulo 4 only. By item (c), all these factors are different from r 1,... r N. Hence there exist at least N + 1 different primes equivalent to 1 modulo 4. Since we know that such primes exist, there do exist infinitely many. 8 p ν r ν ν=1

10 Problem 3.3 (The little forgotten theorem). Assume that (3.3) z = a + ib = a + b e iπk l with real integers a, b, k, l such that a and b are relatively prime, and k and l are relatively prime. How many different nonzero values can z 0 assume? Prove that there are non besides the obvious eight ones. Answer. The complex number z can only assume the eight values 1, i, 1, i and ±1±i, but no other values. Because of the assumption gcd (a, b) = 1, the extended Euclidean algorithm yields integers s, t such that sa tb = 1, and hence (a + ib)(s + it) = 1 + i(at + bs). Hence no real prime can divide a + ib. We now repeatedly use the fact that the Gaussian integers are a unique factorization domain. Assume the Gaussian prime p + iq divides a + ib. Ruling out all other cases, we show the only possibility is p + iq = 1 + i. Because of the remark above, the case of a real prime p 3 mod 4, and q = 0, is impossible. Hence we are left with the task to rule out the case of a Gaussian prime p + iq with 5 p + q 1 mod 4. In the l-th power of the given equation (3.3), (3.4) (a + ib) l = (a + b ) l the two sides sides are both Gaussian integers as well as real, hence real positive integers. Equation (3.4) implies that p + iq divides the natural number (a + b ) l. Hence p iq divides this same number, too. Since the Gaussian prime p iq divides (a+ib) l, unique factorization implies that p iq divides a + ib, too. Since 5 p + q 1 mod 4. the two numbers p + iq and p iq are relatively prime. Hence we conclude there product (p + iq)(p iq) = p + q divides a + ib, too. But we have already shown that no real prime divides a + ib. Hence the only possibilities left are a + ib = i u (1 + i) s with u = 0, 1,, 3 and s = 0, 1. Theorem 3. (The forgotten little theorem). A Gaussian integer does only have an argument iπk with integer k, l an argument rational in degree measurement if it l lies on the x-axis or on the y-axis, or on one of the two lines of slope ±1 through the origin. Proof. Assume that (3.5) z = a + ib = a + b e iπk l with real integers a, b, k, l such that k and l are relatively prime. Let d := gcd (a, b) and define a := a d and b := b d. By the last problem, a + ib = i u (1 + i) s with u = 0, 1,, 3 and s = 0, 1. Multiplying both sides by d yields a + ib = i u (1 + i) s d with u = 0, 1,, 3 and s = 0, 1, and d any natural number. These are just the Gaussian integers on the four lines Z, i Z, (1 + i) Z, and (1 i) Z, as to be shown. 9

Corollary. Let a + ib be a Gaussian integer with a 0, b 0. Both real- and imaginary parts of (a + ib) l are nonzero if either l odd or a b. If l > 0 is even, the following happens: l Re (a + ib) l Im (a + ib) l l mod 4 Re (a + ib) l = 0 a = b Im (a + ib) l 0 l 0 mod 4 Re (a + ib) l 0 Im (a + ib) l = 0 a = b 10 Problem 3.4. Give the reason for Corollary 3.. Proof of Corollary 3.. For any nonzero Gaussian integer a + ib, and integer l > 0, the equation (3.6) (a + ib) l = i u (a + b ) l is equivalent to Re (a + ib) l = 0 for u odd, but equivalent to Im (a + ib) l = 0 for u even. In all cases, the equation (3.7) (a + ib) 4l = (a + b ) l follows. Hence, as explained in the solution of Problem 3.3, we conclude that either a = 0, or b = 0, or a = b. Since we have excluded the first two possibilities, we conclude that a = ±b and hence equation 3.6 implies a l (1 ± i) l = i u l/ a l. Hence l = m is even and (±i) m = i u. Hence either l mod 4, and m, u both odd, and Re (a + ib) l = 0 or l 0 mod 4, and m, u both even, and Im (a + ib) l = 0. 10 Problem 3.5. (a + ib)l+ R l (a, b) := Re a b (a + ib)l+4 S l (a, b) := Im ab(a b ) Calculate R 0, S 0, R 4, S 4. Prove that for all l 0 mod 4, R l and S l are integer homogenous and symmetric polynomials in a and b. Answer. (a + ib) R 0 (a, b) = Re = a b a b a b = 1 (a + ib)6 R 4 (a, b) = Re = a6 15a 4 b + 15a b 4 b 6 = a 4 14a b + b 4 a b a b (a + ib)4 S 0 (a, b) = Im ab(a b ) = 4a3 b 4ab 3 ab(a b ) = (a + ib)8 S 4 (a, b) = Im ab(a b ) = 8a7 b 56a 5 b 3 + 56a 3 b 5 8ab 7 = 4a 4 4a b + 4b 4 ab(a b ) 30

After some pain with the binomial formulas, one gets the general case with l = 4m: m +m ( ) 4m + R 4m (a, b) = ( 1) s a m+t b m t s s=0 t= m m +m ( ) ( 1) s 4m + 4 S 4m (a, b) = a m+t b m t s + 1 s=0 t= m Since the binomial coefficients ( ) even odd are even, these are integer polynomials the other assertions are easy to check, too. 10 Problem 3.6 (Calculation to the bones). Calculate R 4m (1, 1) and S 4m (1, 1), confirming they are nonzero. Answer. R l + (a + b )abs l 4 = Re (a + ib)l+ + (a + b )Im (a + ib) l a b With a = b = 1 and l = 4m 4, we get = Re (a + ib)l+ Re i(a ib)(a + ib) l+1 a b [a + ib i(a ib)](a + ib)l+1 = Re a b (1 i)(a + ib)l+1 = Re a + b R 4m (1, 1) + 4S 4m 4 (1, 1) = Re (1 i)(1 + i) 4m+1 / = ( 4) m With a = 1 + ε = z and b = 1, we get in the limit z 1 using l Hôpital s rule (1 + ε i)4m+1 R 4m (1, 1) 4S 4m 4 (1, 1) = lim Re (1 i) ε 0 ε d (z i)4m+1 = Re (1 i) d z = Re (4m + 1)(1 i) 4m+1 = (4m + 1)( 4) m Both formulas together imply S 4m 4 = m( 4) m 1. Actually, we check that for all m 0 R 4m = (m + 1)( 4) m, S 4m = (m + )( 4) m 3.3 Sums of two squares From the decomposition of a Gaussian integer into Gaussian primes, one can quite easily see how many solutions the integer equation m = a +b has for any given natural number m. 31

10 Problem 3.7. We begin with some examples. For this illustration, I count only the solutions of m = a + b with integers 0 a b, but give these solutions completely. Give a list for m = 1 through 30. Answer. m list of a + b 1 0 + 1 1 + 1 3 no solution 4 0 + 5 1 + 6 no solution 7 no solution 8 + 9 0 + 3 10 1 + 3 11 no solution 1 no solution 13 + 3 14 0 + 15 1 + m list of a + b 16 0 + 4 17 1 + 4 18 3 + 3 19 no solution 0 + 4 1 no solution no solution 3 no solution 4 no solution 5 0 + 5 = 3 + 4 6 1 + 5 7 no solution 8 no solution 9 + 5 30 no solution It is still hard to find a pattern. Since the square of the absolute value of a complex number is the sum of the squares of its real- and imaginary parts, we can use complex arithmetic. Here are some further examples for illustration. (a) 1 + i = 1 + = 5 (b) 3 + i = 3 + = 13 (c) The square of the absolute value of (1 + i) ( 3 + i) = 7 4i, and (1 + i) ( 3 i) = 1 8i implies 5 13 = 7 + 4 = 1 + 8 = 65. (d) Squaring part (c) yields (1 + i) ( 3 + i) = ( 3 + 4i)(5 1i) = 33 + 56i (1 + i) ( 3 i) = ( 3 + 4i)(5 + 1i) = 63 16i The square of the absolute value yields 5 13 = 33 + 56 = 63 + 16 = 65 Are there more ways to solve a + b = 65? Indeed, there are still two further solutions obtained as absolute squares of 13( 3+4i) = 39+5i and 5(5 1i) = 5 60i. Last not least, 65 is a perfect square. 39 + 5 = 5 + 60 = 0 + 65 = 65 3

(e) The absolute square of (1 + i)(1 + i) = 1 + 3i yields 10 = 1 + 3. 10 Problem 3.8. Prove that a natural number is a perfect square if and only if it has an odd number of divisors. Answer. If d [1, m) is a divisor of m N, then m ( m, m] is different one. In d that way, all divisors of m appear in pairs. The only exception is m in the case that m is a perfect square. Proposition 3.1. The integer equation m = a + b is solvable for a given natural number m with integers a, b if and only if, in the prime decomposition of m, all primes p 3 mod 4 appear with even multiplicity. In other words, m can be factored as m = s g c where g has only prime factors congruent 3 mod 4, and (3.8) c = has only prime factors congruent 1 mod 4. N ν=1 Theorem 3.3. The number of different ways one can decompose m = s g c into squares of integers a, b such that m = a + b is 4τ(c). Here τ(c) = r sν ν N (1 + s ν ) ν=1 is the number of divisors of c. The numbers a + ib from the solutions are exactly the Gaussian integers (3.9) a + ib := i u (1 + i) s g N (p ν + iq ν ) σν (p ν iq ν ) τν ν=1 All possible choices are obtained with u = 0, 1,, 3 and σ ν, τ ν 0 with σ ν + τ ν = s ν for ν = 1... N. For example m = 65 is decomposed as 65 = 5 13 and has 9 divisors. The possible 33

values of a + ib as solution of (3.9) with unit factor i u = 1 are (1 + i) ( 3 + i) = ( 3 + 4i)(5 1i) = 33 + 56i, (1 + i) ( 3 + i)( 3 i) = ( 3 + 4i) 13 = 39 + 5i, (1 + i) ( 3 i) = ( 3 + 4i)(5 + 1i) = 63 16i, (1 + i)(1 i)( 3 + i) = 5 (5 1i) = 5 60i, (1 + i)(1 i)( 3 + i)( 3 i) = 5 13 = 65, (1 + i)(1 i)( 3 i) = 5 (5 + 1i) = 5 + 60i, (1 i) ( 3 + i) = ( 3 4i)(5 1i) = 63 + 16i, (1 i) ( 3 + i)( 3 i) = ( 3 4i) 13 = 39 5i, (1 i) ( 3 i) = ( 3 4i)(5 + 1i) = 33 56i, As one sees there are still pairs of conjugate complex solutions, and one real solution since 65 is a perfect square. Remark. If m is not a perfect square, there are τ(c) essentially different solutions of m = a + b with 1 a b. If m is a perfect square, there are τ(c) 1 essentially different solutions of m = a + b with 1 a b. 10 Problem 3.9. Prove that a Gaussian integer a + ib with prime decomposition (3.9) satisfies gcd (a, b) = 1 if and only if s = 0 or s = 1; g = 1; either σ ν = 0 or τ ν = 0 for all ν = 1,... N. Answer. A Gaussian integer has relatively prime real and imaginary parts if and only if it is not divisible by any real prime. But the three conditions just imply: a + ib is not divisible by ; a + ib is not divisible by any prime factor congruent to 3 mod 4; a + ib is not divisible by any real prime congruent to 5 mod 4. Proof of Proposition 3.1 and Theorem 3.3. For any given natural number m, let d be the divisor of m assembling all prime factors congruent 3 mod 4. Let c be the divisor of m assembling all prime factors congruent 1 mod 4. The factor c is completely decomposed into its prime factors as in formula (3.8). In the ring of Gaussian integers, the usual prime factoring of m will split further into irreducible factors (3.10) m = s dc = i 3s (1 + i) s d N (p ν + iq ν ) sν (p ν iq ν ) sν ν=1 34