Survey
* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project
18.781 Homework 3
Due: 25th February 2014
Q 1 (2.1(26)). Show that the product of three consecutive integers is divisible by 504 if the middle one is a
cube.
Proof. 504 = 23 ∗ 32 ∗ 7. Let the three consecutive numbers be {x3 − 1, x3 , x3 + 1}. Their product is P =
x3 (x6 −1). 7 | x7 −x by Fermat’s theorem, and therefore 7 | x2 (x7 −x), i.e., 7 | P . x6 −1 = (x2 −1)(x4 +x2 +1).
If x ≡ 0 (mod 2), then 23 | x3 and therefore 8 | P . If x 0 (mod 2), then x = 2y + 1 by the division
algorithm and x2 − 1 = 4y(y + 1). 2 | y 2 − y by Fermat’s theorem and therefore, 2 | (y 2 − y + 2y). This shows
8 | (x2 − 1) and therefore 8 | P . If x ≡ 0 (mod 3), then 32 | x3 and therefore 32 | P . If x 0 (mod 3), then
x2 ≡ 1 (mod 3) which in turn implies x4 ≡ 1 (mod 3) and therefore x4 + x2 + 1 ≡ 3 (mod 3) = 0 (mod 3).
32 | (x2 − 1)(x4 + x2 + 1) and therefore 32 | P . As 23 , 32 and 7 are pairwise coprime, this shows that their
product divides P for any x.
Q 2 (2.1(30)). What are the last two digits in the ordinary decimal representation of 34 00?
Proof. For the last two digits, we will be interested in 3400 (mod 100). Now, 100 = 22 ∗ 52 . Now, 32 ≡
10
1 (mod 4). ϕ(52 ) = 52 − 5 = 20 and therefore, 320 ≡ 1 (mod 25). 320 ≡ (32 ) (mod 4), i.e., 320 ≡ 1 (mod 4).
2
As 4 and 25 are coprime, we have 320 ≡ 1 (mod 100). (320 ) 0 ≡ 120 mod 100. This shows that the last two
digits in the ordinary decimal representation of 3400 are 0 (tens place) and 1 (units place).
Q 3 (2.1(44)). Show that if p is prime then p−1
≡ (−1)k (mod p) for 0 ≤ k ≤ p − 1.
k
Proof. This holds for k = 0 as p−1
= 1 ≡ (−1)0 (mod p). Assume k ≥ 1.
0
p−1
∗ k! = (p − 1) ∗ (p − 2) ∗ . . . ∗ (p − k)
k
≡ (−1) ∗ (−2) ∗ . . . ∗ (−k) (mod p)
≡ (−1)k k! (mod p)
As p is a prime and p - l for 1 ≤ l ≤ k, (k!, p) = 1. By Theorem 2.3(2), this implies p−1
≡ (−1)k (mod p).
k
Q 4 (2.1(45)). Show that if p is prime, then kp ≡ 0 (mod p) for 1 ≤ k ≤ p − 1.
p!
Proof. As kp = k!(p−k)!
is an integer, p(p − 1)! ≡ p ∗ 0 (mod k!(p − k)!). Now, p is prime and p - l for any
1 ≤ l ≤ p − 1, so p - k!(p − k)! or in other words (p, k!(p − k)!) = 1 for 1 ≤ k ≤ p − 1. By Theorem
2.3(2), we
p
1
have that (p − 1)! ≡ 0 (mod k!(p − k)!). In other words, p ∗ k is an integer. This shows p | p ∗ p1 ∗ kp ,
i.e., p | kp .
Q 5 (2.1(49)). If p is any prime other than 2 or 5, prove that p divides infinitely many of the integers
9, 99, 999, 9999, · · · . If p is any prime other than 2 or 5, prove that p divides infinitely many of the integers
1, 11, 111, 1111, · · · .
k
Proof. 99...99
| {z } = 10 − 1 and 11...11
| {z } =
k−1
10k −1
9 .
Let p be a prime different from 2 or 5. Let l = m(p − 1).
k−1
Then, for any integer m,
10l ≡ (10p−1 )m ≡ 1m ≡ 1 mod p
1
m(p−1)
This shows that p divides 10m(p−1) for all m ≥ 1. For any prime p 6= 3, this shows that p | 9. 10
m(p−1)
10
9
−1
,
−1
and therefore p |
(as p - 9). Note that for a number to be divisible by 3 a necessary and
9
sufficient condition is that the sum of its digits be divisible by 3. This is because if a number is written as
ck 10k + ck−1 10k−1 + . . . + c1 .10 + c0 , then
ck (10k − 1 + 1) + ck−1 (10k−1 − 1 + 1) + . . . + c1 (10 − 1 + 1) + c0 ≡ ck + ck−1 + . . . + c1 + c0 mod 3
as 3 | 10k − 1 for all k. This shows that 3 divides 11...11
| {z } for all m ≥ 1.
3m
Q 6 (2.1(56)). Let p be a prime number, any suppose that x is an integer such that x2 ≡ −2 (mod p). By
considering the numbers u + xv for various pairs (u, v) show that at least one of the equations a2 + 2b2 = p,
a2 + 2b2 = 2p has a solution.
Proof. The proof of this goes exactly along the lines of proof of Lemma 2.13 in the book, mutatis mutandis,
the main change being in the very last step where we instead have 0 < a2 + 2b2 < 3p and p | (a2 + 2b2 ).
√
√
√
We will repeat it here. Define f (u, v) = u + xv, let K = [ p]. p is not an integer, so K < p < K + 1.
Consider pairs (u, v) for 0 ≤ u ≤ K and 0 ≤ v ≤ K. Since u and v each take on K + 1 values, there are
√
(K + 1)2 pairs. K + 1 > p tells us that (K + 1)2 > p. The pigeonhole principle tells us that there are two
pairs (u1 , v1 and (u2 , v2 ) in the interval such that u1 + xv1 ≡ u2 + xv2 (mod p). Let a = u1 − u2 , b = v1 − v2 .
Then a ≡ −xb (mod p), and squaring both sides we get a2 ≡ x2 b2 ≡ −2b2 (mod p). So p | a2 + 2b2 . As
(u1 , v1 ) 6= (u2 , v2 ), we have a2 + 2b2 > 0. As u1 , u2 , v1 , v2 are all in [0, K], we have −K ≤ a ≤ K and
√
√
√
−K ≤ b ≤ K, but K < p, so |a| < p and |b| < p, so squaring gives a2 < p and b2 < p. This tells us
that 0 < a2 + 2b2 < 3p and we also have p | a2 + 2b2 . The only multiples of p in (0, 3p) are p and 2p, so
either a2 + 2b2 = p or a2 + 2b2 = 2p.
2