A Friendly Problem Book of Elementary Number Theory (With Hints)
XIONG Rui March 2, 2018 0 Preface
In 2017, I was honoured to become a teaching assistant of Elementary Number Theory (for freshmen major in mathematics), as a junior students (grade 3). The text teacher chosen is [30] which introduces a lot of domains of number theory, but in an elementary way. One of the shortcoming of this text is that such a good book covering so much domains is written for non-math-majors. So I was asked to present exercises weekly to supplement the course (Actually, the computer programme assignment takes the most exercise in our text). But almost every book, especially in China, titled “Elementary Number Theory”, has a lot of stupid exercises involving just tricks and tricks. I think too much tricks will separate us from the theory itself. So I want to select some I think “beautiful” exercises. And of course, some of them are required some tricks, as well. When I was a freshman to learn elementary number theory (used another book [18]). I was always frustrated by my unsolved exercises. And some of them can actually not be dealt with by method the book present. Then I loss all my interests in number theory until I learn more deep in Algebra. So, as a result, I give almost all subquestion a hint unless it is literally trivial, to protect the reader from frustrating by actually interesting number theory. Another feature of my selection is to give a lot of problems with deep background, and give sufficient reference for readers to broaden his or her horizons. Clearly, some of them is almost unreadable, but you can read a part, even a little∼little part, of their papers. The purpose of my attempt is to make freshmen familiar with the paper reading and critical thinking rather than some delicate tricky exercises. The text covers the discussion of Mersenne primes and perfect numbers. So I don’t view it as an excellent exercise but knowledge. If you are not a Silverman-user, you can read his book for some materials of this. And eventually, English is not my mother tongue, so beaucoup de grammar mistakes would exists, thank you.
Acknowledgement The picture in title is taken from Liangnian http:// www.zcool.com.cn/work/ZNTA3NDAwMA==.html. I want to thank professor Shoumin Liu, the teacher of the course, thank the freshmen major in Mathematics in class of Taishan college, and thank Guoxuan Li, another teaching assistant of our course. Without their support, this booklet could not be accomplished.
XIONG Rui Contents
0 Preface 2
1 Pythagorean Triples 1
2 Linear equation 4
3 Unique factorization 6
4 Congruence and Order 8
5 Chinese Remainder Theorem 12
6 Primitive Element 12
8 Euler’s ϕ-function 20
9 Arithmetic function 21
10 Sum of two squares 21
11 Diophantine Approximation 22
12 Gaussian Integers 25
13 Irrational number 30
1 Pythagorean Triples
Exercise 1 Prove that every primitive Pythagorean triple (a, b, c) with a odd and b even has the form
a = x2 − y2 b = 2xy c = x2 + y2 where a, b are coprime and consist exactly one odd number and one even num- ber.
1 Exercise 2 (Hippasus) An integer a is a square of rational√ number, show that a is a square of integer number. As a consequence, a is either an irrational number or an integer.
Problem 3 Moreover, prove the following “rational root theorem”:
n p For any polynomial f(X) = anX + ... + a0 ∈ Z[X], if X = ± q is a root of f(X). Assume that p, q coprime, then q | |an|, p | |a0|. And derive (2) using it.
Exercise 4 For θ ∈ [0, π/2), show that
2ab a2 − b2 sin θ, cos θ ∈ ⇐⇒ ∃a, b ∈ , such that sin θ = , cos θ = Q Z a2 + b2 a2 + b2 Give a geometry interpretation.
Exercise 5 For n ≥ 3, their exists a Pythagorean triple (not necessarily primitive) (x, y, z) such that n ∈ {x, y, z}. ( 1 mod 4 n is odd, Exercise 6 Prove that for any n ∈ Z, n2 ≡ . 0 mod 4 n is even.
1 mod 8 n is odd Exercise 7 Prove that for any n ∈ Z, n2 ≡ 0 mod 8 n ≡ 0 mod 4.. 4 mod 8 n ≡ 2 mod 4
1Hippasus was a (tragical) Pythagorean philosopher. His discovery of irrational numbers is said to have been shocking to the Pythagoreans, and Hippasus is supposed to have drowned at sea, apparently as a punishment from the gods for divulging this.
1 Problem 8 (Fermat) The purpose of this problem is to show x4 + y4 = z2 has no nontrivial solution. (1)Show that it is without loss of generality that one assume x, y, z pairwise coprime. (Hint: Otherwise, p divides any two elements of {x, y, z}, then it divides the rest one. ) (2)Show that it suffices to deal with the case z is odd. (Hint: When z is even, then by mod 4, one can show that x and y both even. ) Then without loss of generality, one can assume x is odd and y is even, then x2 = u2 − v2 y2 = 2uv z = u2 + v2 With u, v coprime. (3)Show that u is odd and v is even. (Hint: Mod 4.) Then x = s2 − t2 v = 2st u = s2 + t2 with s, t coprime. Then y 2 = st(s2 + t2) 2 (4)Show that s2 + t2 is coprime to s and t respectively. Then s = S2 t = T 2 s2 + t2 = R2 one have S4 + T 4 = R2 √ √ √ But |R| = s2 + t2 = u < 2uv = |y|. Then, use Fermat’s favourite infi- nite descent. Or, equivalently, one can pick z as small as possible, then when you find another solution with smaller z, you will get a desired contradiction.
Problem 9 (Fermat) The purpose of this problem is to show x4 − y4 = z2 has no nontrivial solution2. (1)Show that it is still without loss of generality that one assume x, y, z pairwise coprime. (2)Show that it suffices to deal with the case z is odd. (Hint: When z is even, then z = 2pq y2 = p2 − q2 x2 = p2 + q2 then p4 − q4 = (xy)2 or q4 − p4 = (xy)2. Note that xy is odd. ) Then without loss of generality, one can assume x is odd and y is even, then x2 = u2 + v2 y2 = 2uv z = u2 − v2
2 The sketch of proof follows [14] P391, a little different from our text book.
2 With u, v coprime. (3)Show that u is odd and v is even. (Hint: Mod 4.) Then x = s2 + t2 v = 2st u = s2 − t2 with s, t coprime. Then y 2 = st(s2 − t2) 2 (4)Show that s2 − t2 is coprime to s and t respectively. Then s = S2 t = T 2 s2 − t2 = R2 one have S4 − T 4 = R2 √ √ √ But |R| = s2 − t2 = u < 2uv = |y|. Then, use Fermat’s favourite infinite descent. Problem 10 Show that there is no right triangle with rational sides and of 1 a2−b2 area 1. (Hint: It suffices to prove that 2 ab 2 fails to be square of rational number. Without loss of generality, assume
2 2 2 ab(a − b ) = c a, b, c ∈ Z with a, b coprime and consisting exactly one odd number and one even number. Then a, b, a+b, a−b are pairwise coprime, then a, b, a+b, a−b are all squares, then use the fact stated in (8) or (9). ) Remark. For which number can be the area of some right triangle with rational sides? Such number is called congruent number, cf [1]. The square-free congruent number less than 50 is given as follow (cf [2]) 5, 6, 7, 13, 14, 15, 20, 21, 22, 23, 24, 28, 29, 30, 31, 34, 37, 38, 39, 41, 45, 46, 47,... For example, 1 is not a congruence number, as we presented above. And, 5 is the area of 20/3, 3/2, 41/6-triangle, and 6 is the ares of 3, 4, 5-triangle. See [13] or [15], for a detailed introduction of the problem and its history in elementary number theory level. For another example, The congruent number 53, is the area of k2 − `2, 2k`, k2 + `2-triangle with 1873180325 1158313156 k = ` = 297855654284978790 297855654284978790 it implies the difficulty of direct computation to determine whether a number is congruent number. Actually, this problem is deeply connected with elliptic curves, more exactly, the elliptic curves y2 = x3 − n2x.
3 Problem 11 Show that for given n the followings are equivalent (1)There is a right triangle with rational sides of area n. (2)There is a isosceles triangle with rational sides of area 2n. (Hint: To a2+b2−c2 see (2)⇒(1), use the formula S = ab sin C, cos C = 2ab .) (3)Diophantus equation ab(a2 − b2) = nc2 has nontrivial solution. (4)The elliptic curve y2 = x3 − n2x has nontrivial rational point. (Hint: To see (3)⇒(4), show that
n2c2 na3 na = − n2 b2 b b And for any nontrivial rational point (x, y),
x2 − n2 2xn x2 + n2 , , y y y is a desired triangle. )
2 Linear equation
Exercise 12 (n-decimal system) For fixed number r > 1, any positive number n can be written as
m n = amr + ... + a0 uniquely, with 0 ≤ ai < r. It is called the base r expansion of n. (Hint: Induction. )
Exercise 13 Show that the equation
ax + by = g with g = gcd(a, b), has a solution (x0, y0) such that 0 < |x0| < b, 0 < |y0| < a. Exercise 14 Generally, show that the equation
ax + by = g has solution iff gcd(a, b)|g. And if (x0, y0) is one of the solution, any solution is of the form ( b x = x0 + gcd(a,b) t a t ∈ Z y = y0 − gcd(a,b) t
4 Exercise 15 If gcd(a, b) = 1, show that ax + by = n have nonnegative solution, i.e. x, y are both nonnegative, when n > ab−a−b. (Hint: draw a figure. ) Problem 16 (Euclidean proof of Dirichlet Theorem) It is well-known that Euclid proved that there are infinite primes 3 approximately 2 thousand years ago. The sketch of his proof is
Otherwise, let p1, . . . , pn be all primes. Then P = p1 . . . pn + 1 is coprime to any primes. Thus P is a prime different from p1, . . . , pn, by the unique factorization, a contradiction. A famous theorem proved using analytic method by Dirichlet claims
There are infinite many primes in {an + b : n ∈ Z} with a, b coprime. That is, there are infinite many primes p ≡ b mod a. The purpose of this problem is to generalize the ideal of Euclid to give an elementary attempt to Dirichlet’s theorem. (1)Prove that there are infinite many primes p ≡ 3 mod 4. (Hint: Other- wise, let p1, . . . , pn be all primes in the form of 4n+3. Then P = 4p1 . . . pn −1 is coprime to any pi, but P ≡ 3 mod 4, then there exists at least one prime, say p, in the factorization such that p ≡ 1 mod 4.) (2)Prove that there are infinite many primes p ≡ 5 mod 6. (Hint: Oth- erwise, let p1, . . . , pn be all primes in the form of 4n + 1. Then consider P = 6p1 . . . pn − 1.) (3)We will soon see that for any odd prime p, the equation x2 ≡ −1 mod p has a solution iff p ≡ 1 mod 4. Using this fact show that there are infinite 2 primes ≡ 1 mod 4. (Hint: p|4(p1 . . . pn) + 1 ⇒ p ≡ 1 mod 4.) (4)We will see that that for any odd prime p, the the dth cyclotomic poly- nomial Φd(X) such that
p|Φd(n)for some n ⇒ p6 | n, (p|d or p ≡ 1 mod d)
Show that there are infinite primes ≡ 1 mod d. (Where Φd(n) > n − 1.) (Hint: For every k ≥ 2, p|Φkn(kn) implies p ≡ 1 mod kn, then p is a prime ≡ 1 mod n larger then kn.)
3What he literally said is that ‘prime numbers are more than any assigned multitude of prime numbers.’
5 Remark. If a nonconstant polynomial f(X) ∈ Z[X] satisfy for almost every (that is, except finite many cases) prime p,
p|f(n) for some n ⇒ p ≡ 1 or b mod a and infinitely many primes of the latter type occur, then f(X) is called an Euclidean polynomial for b mod a. For instance, X + 1 is an Euclidean polynomial for 0 mod 1; 4X − 1 is an Euclidean polynomial for 3 mod 4; 6X − 1 is an Euclidean polynomial for 5 mod 6; 4X2 + 1 is an Euclidean polynomial for 1 mod 4. You can refer to [16] and [27] if you are interested in.
3 Unique factorization
Exercise 17 Show that there exists a prime between n and n!. (Hint: Oth- erwise, consider the product of all primes less than n and add 1.)
Exercise 18 Prove that there always exists a consequence of consecutive num- bers of composite for arbitrary length. (Hint: For example, (n+1)!+2,..., (n+ 1)! + (n + 1) serves. )
Problem 19 (p-adic valuation) For a fixed prime p, we define ordp n, the so-called p-adic valuation, for all n as follow
r r+1 ordp n = r ⇐⇒ p |n, p 6 | n that is, ordp n is the index of p in the decomposition of n. (0)Show that ordp(xy) = ordp(x) + ordp(y) (Hint: Do not expect extravagant praise when you find a proof. ) (1)Show that
ordp(x + y) ≥ min(ordp(x), ordp(y)) x + y 6= 0
And when ord(x) 6= ord(y), the equality holds. If we accept the convention ordp 0 = ∞, then we can remove the assump- tion x + y 6= 0. (2)Show that
ordp(x1, . . . , xn) ≥ min (ordp(xi)) i=1,...,n
6 And when exists i such that j 6= i ⇒ ordp(xj) > ordp(xi), the equality holds. (3)One can extend ordp to Q by a ord = ord a − ord b p b p p show that it is well-defined, and satisfy the condition in (1) and (2).
Problem 20 Show that for n > 1, 1 1 + ... + n fails to be an integer. (Hint: Use the fact stated in (19) where p = 2. Note that there is precisely one term achieving the minimum. )
P∞ Problem 21 (Legendre) In this problem, we will calculate ordp(n!) = i=1 ordp i. (1)Show that ∞ X n ord (n!) = p pi i=1 Pn Pn (Hint: Algebraically, use the identity, i=1 iki = i=1(ki+...+kn), a special case of Abel’s partial summation formula. ) (2)Assume m n = amp + ... + a0 is the base p expansion of n, see (12). Show that
n − (a + ... + a ) ord (n!) = m 0 p p − 1
(3)Without using the meanings of the binomial coefficients, prove that
n! ∀m ≤ n ∈ , ∈ Z≥1 m!(n − m)! Z