Quadratic Congruences
Total Page:16
File Type:pdf, Size:1020Kb
Quadratic Congruences Paul Stoienescu and Tudor-Dimitrie Popescu Abstract. In this note, we will present some olympiad problems which can be solved using quadratic congruences arguments. 1 Definitions and Properties Let x; y and z be integers, x > 1, y ≥ 1 and (x; z) = 1. We say that z is a residue of y − th degree modulo x if congruence ny ≡ z (mod x) has an intenger solu- tion. Otherwise z is a nonresidue of y −th degree. For x = 2; 3; 4 the residues are called quadratic, cubic, biquadratic, respectively. This article is mainly focused on quadratic residues and their properties. p−1 Lemma Let p be an odd prime. There are 2 quadratic residues in the set f1; 2; 3:::; p − 1g. 1.1 Legendre's Symbol a Given a prime number p and an integer a, Legendre's symbol p is defined as: ( a 1 if a is a quadratic residue modulo p ( ) = (1) p −1 otherwise a b Property 1 If a ≡ b (mod p) and ab is not divisible by p, then ( p ) = ( p ). ab a b Property 2 Legendre's symbol is multiplicative, i:e: ( p ) = ( p )( p ) for all integers a; b and prime number p > 2. p−1 −1 2 Property 3 If p 6= 2, then ( p ) = (−1) . p2−1 2 8 Property 4 If p 6= 2, then ( p ) = (−1) . p−1 2 a Property 5 If p 6 ja, p 6= 2, then a ≡ ( p ) (mod p) (Euler's Criterion) p q (p−1)·(q−1) 4 Property 6 If p; q are distinct odd prime numbers, then ( q ) = ( p )·(−1) (Quadratic Reciprocity Law of Gauss) 1.2 Quadratic Congruences to Composite Moduli α1 α2 αn Let a be an integer and b an odd number, and let b = p1 p2 : : : pn be the a factorization of b into primes. Jakobi's Symbol ( b ) is defined as: a a a a ( ) = ( )α1 ( )α2 ::: ( )αn (2) b p1 p2 pn Jakobi's Symbol has almost the same properties as Legendre's with few modi- fications: It doesn't have property 5, while at properties 3 and 4 p is changed with an odd integer and at property 6 p; q are changed with distinct odd integers with no common divisors. a It is easy to see that ( b ) = −1 implies that a is a quadratic nonresidue (mod p). a a Indeed, if ( ) = −1 , then by definition ( ) = −1 for at least one pijb; hence b pi a is a quadratic nonresidue modulo pi. The converse is false as seen from the 2 2 2 example ( 15 ) = ( 3 )( 5 ) = (−1)(−1) = 1 but 2 is not a quadratic residue modulo 15. α1 α2 αn Theorem Let a be an integer and b be a positive integer, and let b = p1 p2 : : : pn be the factorization of b into primes. Then a is a quadratic residue modulo b if αi and only if a is a quadratic residue modulo pi , for each i = 1; 2; : : : n. 2 Warm-Up Problems 2.1 1:The positive integers a and b are such that the numbers 15a+16b and 16a−15b are both squares of positive integers. What is the least possible value that can be taken on by the smaller of these two squares? 2 2 15k2+16l2 16k2−15l2 Solution Let 15a+16b = k and 16a−15b = l ) a = 481 , b = 481 , k; l 2 N ∗. 481 = 13·37 ) 15k2 +16l2 ≡ 0 (mod 13), 2k2 ≡ −3l2 (mod 13), k2 ≡ 2 5 2 2 2 5l (mod 13). We have ( 13 ) = −1 ) 13jl, 13jk. 15k +16l ≡ 0 (mod 37), 32l ≡ −30k2 (mod 37), −5l2 ≡ −30k2 (mod 37), l2 ≡ 6k2 (mod 37). Combined with 6 the fact that ( 37 ) = −1 we get that 37jk, 37jl. The least possible value for l is 13 · 37 = 481. We can take k = l = 481 and thus we'll get a = 31 · 481, b = 481. 2.2 Prove that 2n+1 has no prime factors of the form 8k+7. (Vietnam team selection test 2004) Solution Assume that there exists a prime p such that pj2n + 1 and p ≡ 7 p−1 −1 −1 2 (mod 8). If n is even, then ( p ) = 1 but ( p ) = (−1) = −1 because p ≡ 3 p2−1 −2 −2 8 (mod 4), a contradiction. If n is odd, then ( p ) = 1 but ( p ) = (−1) · p−1 (−1) 2 = −1 again a contradiction due to the fact that p ≡ 7 (mod 8). 2.3 Let p a prime number greater than 3. Calculate: p−1 X2 2k2 k2 a)S = − 2 · if p ≡ 1 mod 4 p p k=1 p−1 X2 k2 b) T = if p ≡ 1 mod 8 p k=1 Solution a)Let r1; r2:::r p−1 be the quadradic residues (mod p) First, let's ob- 2 p−2 2 X ri 2ri serve that the sum is equivalent to 2f g − f g. Each term 2f ri g − f 2ri g p p p p i=1 p−1 p−1 is 0 if ri ≤ 2 and 1 if ri > 2 . So S is the number of quadratic residues p−1 which are greater than 2 . Since p ≡ 1 (mod 4) ) if ri is quadratic residue , p−1 then so is p − ri, so there are half quadratic residues which are greater than 2 p−1 ) S = 4 . p−1 X2 2k2 [ ] − S p−1 p X2 2k2 b) We have T = k=1 so all we have to do is to calculate [ ] 2 p k=1 2 2 2 (p−1) 2(1 +2 +::: 4 )−(r1+r2+:::r p−1 ) 2 which is equivalent to where r1; r2; :::r p−1 are p 2 the quadratic residues (mod p) . This is because 2 is a quadratic residue p(p−1) (mod p). From now on it's easy because r1 + r2 + :::r p−1 = (remember 2 4 that p ≡ 1 (mod 4) means that if ri is a quadratic residue, then so is p − ri). 2.4 Let m; n ≥ 3 be positive odd integers. Prove that 2m − 1 doesn't divide 3n − 1. Solution Here we will use Jacoby's Symbol. Suppose that 2m −1 divides 3n −1. n−1 2 m 2 m Let x = 3 2 . We have 3x ≡ 1 (mod 2 − 1) so (3x) ≡ 3 (mod 2 − 1) ) m 2m−2 3 3 2 −1 2 ( 2m−1 ) = 1. Using quadratic reciprocity, 1 = ( 2m−1 ) = ( 3 )(−1) ) 2m−1 m ( 3 ) = −1 and this is a contradiction due to the fact that 2 − 1 ≡ 1 (mod 3). 3 Harder Problems 3.1 2013 Romanian Master in Mathematics For a positive integer a, define a sequence of integers x1; x2;::: by letting x1 = a xn and xn+1 = 2xn + 1 for n ≥ 1. Let yn = 2 − 1. Determine the largest possible k such that, for some positive integer a, the numbers y1; : : : ; yk are all prime. Solution We will prove that the answer is 2. Suppose that there exists a such that k ≥ 3. The numbers 2a − 1, 22a+1 − 1, 24a+3 − 1 are primes ) the numbers a; 2a+1; 4a+3 are primes (this is because of the fact that if 2M −1 is prime, then M is also a prime. Otherwise if there existed a natural number d such that djM 4a+3−1 d M 2 2 then 2 − 1 would divide 2 − 1). Let's use Euler's Criterion. 2 ≡ ( 4a+3 ) 2a+1 2 2a+1 2a+1 (mod 4a + 3) ) 2 ≡ ( 4a+3 ) (mod 4a + 3). 2 − 1 is prime so 2 6≡ 1 (mod 4a + 3), otherwise 22a+1 = 4a + 4 and that will lead to a = 1, false. Hence (4a+2)(4a+4) 2 8 (2a+1)(a+1) we have ( 4a+3 ) = −1 ) −1 = (−1) = (−1) ) a + 1 is odd but a is prime so a = 2. If a = 2 we have that 211 − 1 = 23 · 87 is not prime, contradiction. So we get that the answer is 2 and it's achieved for a = 2. 3.2 2004 Romanian IMO Team Selection Test Let p be an odd prime, ai, i = 1; 2 : : : p − 1 be Legendre's symbol of i relative to p−1 p (i.e. ai = 1 if i 2 ≡ 1 and ai = −1 otherwise). Consider the polynomial: p−2 f = a1 + a2X + : : : ap−1X . a) Prove that 1 is a simple root of f if and only if p ≡ 3 (mod 4). b) Prove that if p ≡ 5 (mod 8), then f is a root of f of order exactly 1. p−1 X j Solution a) We have that f(1) = ( ) = 0 because there are p−1 quadratic p 2 j=1 p−1 residues and 2 nonquadratic residues modulo p. Suppose p ≡ 1 (mod 4). Let's 0 0 −1 show that f (1) = 0. f (1) = a2 + 2a3 + 3a4 + ··· + (p − 2)ap−1,( p ) = 1 ) p−1 2 0 X aj = ap−j so (j − 1)aj + (p − j + 1)ap−j = (p − 2)aj and f (1) = (p − 2) aj. j=1 p−1 p−1 X2 X Denote S = aj and T = . S + T = 0 and S = T (because aj = ap−j) j=1 p+1 i= 2 ) S = T = 0 ) f 0(1) = (p − 2)S = 0 and 1 is not a simple root of f. −1 Let's suppose now that p ≡ 3 (mod 4). ( p ) = −1 ) aj = −ap−j+1 ) p−1 2 0 X (j −1)aj +(p−j −1)ap−j = aj(2j −p) is an odd number ) f (1) = aj(2j −p) j=1 p−1 0 is odd (because 2 is odd) , so f (1) 6= 0 and 1 is a simple root of f.