Quadratic Residues. Legendre symbols provide a computational tool for determining whether a quadratic congruence has a solution. = a (p 1)/2 (mod p).

Similar documents
Is 1 a Square Modulo p? Is 2?

MATH 324 Elementary Number Theory Solutions to Practice Problems for Final Examination Monday August 8, 2005

Solutions to Exam 1. Problem 1. a) State Fermat s Little Theorem and Euler s Theorem. b) Let m, n be relatively prime positive integers.

Exam 1 7 = = 49 2 ( ) = = 7 ( ) =

MTH 3527 Number Theory Quiz 10 (Some problems that might be on the quiz and some solutions.) 1. Euler φ-function. Desribe all integers n such that:

Wilson s Theorem and Fermat s Theorem

MT 430 Intro to Number Theory MIDTERM 2 PRACTICE

To be able to determine the quadratic character of an arbitrary number mod p (p an odd prime), we. The first (and most delicate) case concerns 2

On the Fibonacci Sequence. By: Syrous Marivani LSUA. Mathematics Department. Alexandria, LA 71302

Introduction to Number Theory 2. c Eli Biham - November 5, Introduction to Number Theory 2 (12)

Math 124 Homework 5 Solutions

6. Find an inverse of a modulo m for each of these pairs of relatively prime integers using the method

30 HWASIN PARK, JOONGSOO PARK AND DAEYEOUL KIM Lemma 1.1. Let =2 k q +1, k 2 Z +. Then the set of rimitive roots modulo is the set of quadratic non-re

Applications of Fermat s Little Theorem and Congruences

Practice Midterm 2 Solutions

LECTURE 3: CONGRUENCES. 1. Basic properties of congruences We begin by introducing some definitions and elementary properties.

Math 127: Equivalence Relations

The Chinese Remainder Theorem

Collection of rules, techniques and theorems for solving polynomial congruences 11 April 2012 at 22:02

SOLUTIONS TO PROBLEM SET 5. Section 9.1

Discrete Square Root. Çetin Kaya Koç Winter / 11

LECTURE 9: QUADRATIC RESIDUES AND THE LAW OF QUADRATIC RECIPROCITY

UNIVERSITY OF MANITOBA DATE: December 7, FINAL EXAMINATION TITLE PAGE TIME: 3 hours EXAMINER: M. Davidson

SOLUTIONS FOR PROBLEM SET 4

NUMBER THEORY AMIN WITNO

Solutions for the Practice Questions

The Chinese Remainder Theorem

b) Find all positive integers smaller than 200 which leave remainder 1, 3, 4 upon division by 3, 5, 7 respectively.

Carmen s Core Concepts (Math 135)

Primitive Roots. Chapter Orders and Primitive Roots

An interesting class of problems of a computational nature ask for the standard residue of a power of a number, e.g.,

Solutions to Problem Set 6 - Fall 2008 Due Tuesday, Oct. 21 at 1:00

Discrete Math Class 4 ( )

1.6 Congruence Modulo m

6.2 Modular Arithmetic

Fermat s little theorem. RSA.

MAT Modular arithmetic and number theory. Modular arithmetic

#A3 INTEGERS 17 (2017) A NEW CONSTRAINT ON PERFECT CUBOIDS. Thomas A. Plick

Number Theory. Konkreetne Matemaatika

MATH 118 PROBLEM SET 6

MODULAR ARITHMETIC II: CONGRUENCES AND DIVISION

SIZE OF THE SET OF RESIDUES OF INTEGER POWERS OF FIXED EXPONENT

Math 255 Spring 2017 Solving x 2 a (mod n)

Computational Complexity of Generalized Push Fight

Congruence. Solving linear congruences. A linear congruence is an expression in the form. ax b (modm)

Assignment 2. Due: Monday Oct. 15, :59pm

ON SPLITTING UP PILES OF STONES

Modular Arithmetic. claserken. July 2016

Conjectures and Results on Super Congruences

Rational Points On Elliptic Curves - Solutions. (i) Throughout, we ve been looking at elliptic curves in the general form. y 2 = x 3 + Ax + B

A REMARK ON A PAPER OF LUCA AND WALSH 1. Zhao-Jun Li Department of Mathematics, Anhui Normal University, Wuhu, China. Min Tang 2.

Two congruences involving 4-cores

CHAPTER 2. Modular Arithmetic

Solutions for the Practice Final

Math 319 Problem Set #7 Solution 18 April 2002

Public Key Encryption

The Chinese Remainder Theorem

SYMMETRIES OF FIBONACCI POINTS, MOD m

Degree project NUMBER OF PERIODIC POINTS OF CONGRUENTIAL MONOMIAL DYNAMICAL SYSTEMS

The covering congruences of Paul Erdős. Carl Pomerance Dartmouth College

ON THE EQUATION a x x (mod b) Jam Germain

Constructions of Coverings of the Integers: Exploring an Erdős Problem

The congruence relation has many similarities to equality. The following theorem says that congruence, like equality, is an equivalence relation.

Calculators will not be permitted on the exam. The numbers on the exam will be suitable for calculating by hand.

Math 412: Number Theory Lecture 6: congruence system and

University of British Columbia. Math 312, Midterm, 6th of June 2017

MST125. Essential mathematics 2. Number theory

Zhanjiang , People s Republic of China

SQUARING THE MAGIC SQUARES OF ORDER 4

Number Theory - Divisibility Number Theory - Congruences. Number Theory. June 23, Number Theory

Introduction. and Z r1 Z rn. This lecture aims to provide techniques. CRT during the decription process in RSA is explained.

LECTURE 7: POLYNOMIAL CONGRUENCES TO PRIME POWER MODULI

Arithmetic of Remainders (Congruences)

CMPSCI 250: Introduction to Computation. Lecture #14: The Chinese Remainder Theorem David Mix Barrington 4 October 2013

x 8 (mod 15) x 8 3 (mod 5) eli 2 2y 6 (mod 10) y 3 (mod 5) 6x 9 (mod 11) y 3 (mod 11) So y = 3z + 3u + 3w (mod 990) z = (990/9) (990/9) 1

Calculators will not be permitted on the exam. The numbers on the exam will be suitable for calculating by hand.

Number Theory/Cryptography (part 1 of CSC 282)

Congruence properties of the binary partition function

p 1 MAX(a,b) + MIN(a,b) = a+b n m means that m is a an integer multiple of n. Greatest Common Divisor: We say that n divides m.

PRIMES IN SHIFTED SUMS OF LUCAS SEQUENCES. Lenny Jones Department of Mathematics, Shippensburg University, Shippensburg, Pennsylvania

Ramanujan-type Congruences for Overpartitions Modulo 5. Nankai University, Tianjin , P. R. China

Outline Introduction Big Problems that Brun s Sieve Attacks Conclusions. Brun s Sieve. Joe Fields. November 8, 2007

Minimal tilings of a unit square

Arithmetic Properties of Combinatorial Quantities

An elementary study of Goldbach Conjecture

ON MODULI FOR WHICH THE FIBONACCI SEQUENCE CONTAINS A COMPLETE SYSTEM OF RESIDUES S. A. BURR Belt Telephone Laboratories, Inc., Whippany, New Jersey

Foundations of Cryptography

Permutation group and determinants. (Dated: September 19, 2018)

Permutation Groups. Every permutation can be written as a product of disjoint cycles. This factorization is unique up to the order of the factors.

Solutions to Exercises Chapter 6: Latin squares and SDRs

by Michael Filaseta University of South Carolina

Introduction to Modular Arithmetic

Modular Arithmetic. Kieran Cooney - February 18, 2016

Computational Complexity of Generalized Push Fight

A Quick Introduction to Modular Arithmetic

BAND SURGERY ON KNOTS AND LINKS, III

How to Become a Mathemagician: Mental Calculations and Math Magic

THE NUMBER OF PERMUTATIONS WHICH FORM ARITHMETIC PROGRESSIONS MODULO m

A Study of Relationship Among Goldbach Conjecture, Twin prime and Fibonacci number

RESIDUE NUMBER SYSTEM. (introduction to hardware aspects) Dr. Danila Gorodecky

Transcription:

Quadratic Residues 4--015 a is a quadratic residue mod m if x = a (mod m). Otherwise, a is a quadratic nonresidue. Quadratic Recirocity relates the solvability of the congruence x = (mod q) to the solvability of the congruence x = q (mod ), where and q are distinct odd rimes. If is an odd rime, there are equal numbers of quadratic residues and quadratic nonresidues among {1,,..., 1}. If is an odd rime, a > 0, and (a,) = 1, the Legendre symbol a is defined by a { 1 if a is a quadratic residue mod = 1 if a is a quadratic nonresidue mod. Legendre symbols rovide a comutational tool for determining whether a quadratic congruence has a solution. Euler s theorem says that if is an odd rime, a > 0, and (a,) = 1, then a = a ( 1)/ (mod ). Gauss considered the roofs he gave of quadratic recirocity one of his crowning achievements; in fact, he gave 6 distinct roofs during his lifetime. Recirocity is a dee result: Proofs eluded both Euler and Legendre. The recirocitylaw is simle to state. Forand q odd rimes, it relatessolutions to the two congruences x = (mod q) and x = q (mod ). (Note how and q switch laces: This exlains why it s called a recirocity law.) The law of quadratic recirocity says: The congruences are either both solvable or both unsolvable, unless both rimes are congruent to 3 mod 4. In that case, one is solvable while the other is not. Gauss first gave a roof of this when he was 19! Gauss s masterwork, the Disquisitiones Arithmeticae, was ublished in 1801 when Gauss was 4. It changed the course of number theory, collecting scattered results into a unified theory. Definition. Let (a,m) = 1, m > 0. a is a quadratic residue mod m if the following equation has a solution: x = a (mod m). Otherwise, a is a quadratic nonresidue mod m. Examle. 8 is a quadratic residue mod 17, since 5 = 8 (mod 17). 1

However, 8 is a quadratic nonresidue mod 11, because x = 8 (mod 11) has no solutions. n 0 1 3 4 5 6 7 8 9 10 n (mod 11) 0 1 4 9 5 3 3 5 9 4 1 As the table shows, 1, 3, 4, 5, and 9 are quadratic residues mod 11. (0 is not considered a quadratic residue, since (0,11) = 11 1.) But 8 is a quadratic nonresidue mod 11. Notice the symmetry in the nonzero elements of the table. Do you see why this is haening? Lemma. Let be an odd rime. The congruence has: (a) Only the solution x = 0 if a = 0. (b) Exactly 0 or solutions if a. x = a (mod ) Proof. x = 0 solves x = 0 (mod ). Conversely, if x = 0 (mod ), then x, so x, and hence x = 0 (mod ). Suose a. To show there are 0 or solutions, suose there is at least one solution b. Then b = a (mod ), so ( b) = a (mod ). I claim that b and b are distinct. If not, then b = b (mod ), so b. is an odd rime, so. Therefore, b, b = 0 (mod ), b = 0 (mod ), and finally a = 0 (mod ) contradicting a. Hence, b b (mod ). Now I have two distinct solutions; since a quadratic equation mod has at most two solutions (Prove it!), there are exactly two. Examle. x = 8 (mod 17) has 5 and 1 as solutions, and 5 = 1 (mod 17). But note that the result is false if = : x = 1 (mod ) has exactly one solution (x = 1 (mod )). Corollary. Let be an odd rime. There are 1 in {1,..., 1}. quadratic residues and 1 quadratic nonresidues mod Proof. k and k = k have the same square mod. That is, 1 and 1 have the same square, and have the same square,..., and 1 and 1 +1 have the same square. Thus, the number of different squares is 1 these squares are the quadratic residues, and the other 1 numbers in {1,,..., 1} are quadratic nonresidues. The fact observed in the first sentence of the roof exlains the symmetries in the table of squares mod 11 and mod 7 that I gave above. Definition. Let be an odd rime, and let (a,) = 1. The Legendre symbol a is defined by a { 1 if a is a quadratic residue mod = 1 if a is a quadratic nonresidue mod Note that a = 0 is disallowed (since (0,) = 1) even though x = 0 (mod ) has a solution.

Examle. (5,11) = 1. 5 = 1, since 4 = 5 (mod 11). Likewise, 11 = 1, since 6 = 11 (mod 5). 11 5 Note that 5 is congruent to 1 mod 4; as redicted by recirocity, both of the following the congruences have solutions: x = 5 (mod 11) and x = 11 (mod 5). You might wonder about the case where =, or the case where the modulus is comosite. For =, there are only two quadratic congruences: x = 0 (mod ) and x = 1 (mod ). These have the solutions x = 0 (mod ) and x = 1 (mod ) nothing much is going on. If the modulus has rime factorization n = r1 1 r k k, then relative rimality imlies that it s enough to solve the congruences x = a (mod ri i ) for each i. It turns out that solving such a congruence reduces to determining whether a is a quadratic residue mod i. Therefore, there is little harm in concentrating on the case of a single rime. Examle. Solve the congruence I ll solve the congruences x = 79 (mod 91). x = 79 (mod 7) and x = 79 (mod 13). x = 79 (mod 7) reduces to x = (mod 7). Making a table of squares mod 7, I find that the solutions are x = 3 and x = 4 mod 7. x = 79 (mod 13) reduces to x = 1 (mod 13). The solutions are x = 1 and x = 1 = 1 mod 13. I ll consider the = 4 ossibilities, solving using the Chinese Remainder Theorem. But note that since m = ( m), the solutions will come in airs. So once I find a solution m, I know that m is also a solution. Consider x = 3 (mod 7) x = 1 (mod 13) m 7 13 13 7 s = 1 (mod m) 6 a 3 1 x = 13 6 3+7 1 = 48 = 66 (mod 91). Then x = 66 = 5 (mod 91) is another solution. Consider x = 3 (mod 7) x = 1 (mod 13) m 7 13 13 7 s = 1 (mod m) 6 a 3 1 3

x = 13 6 3+7 1 = 40 = 38 (mod 91). Then x = 38 = 53 (mod 91) is another solution. It s ossible that the second comutation might have given me 5, the solution I got earlier. In that case, I d have to move on to one of the other two cases. I got lucky and had to only do two cases, instead of three. Here are some tools for comuting Legendre symbols. Theorem. (Euler) Let be an odd rime, a > 0, (a,) = 1. Then a = a ( 1)/ (mod ). Proof. There are two cases. Suose that a = 1. Then there is a number b such that b = a (mod ). So (b ) ( 1)/ = a ( 1)/ (mod ) b 1 = a ( 1)/ (mod ) If b, then b = a, a contradiction. So b, and Fermat s theorem imlies that b 1 = 1 (mod ). So a ( 1)/ = 1 (mod ), and a = a ( 1)/ (mod ). The other ossibility is a = 1. In this case, consider the set {1,,..., 1}. I claim that these integers occur in airs s, t, such that st = a. First, if s {1,,..., 1}, then s is invertible mod. So I can write s(s 1 a) = a, and the air s, s 1 a, multilies to a. Moreover, s and s 1 a are distinct. If not, s = s 1 a, or s = a, which contradicts a = 1. Since the integers {1,,..., 1} divide u into airs, each multilying to a, and since there are 1 airs, I have 1 ( 1) = a ( 1)/ (mod ). By Wilson s theorem, 1 = a ( 1)/ (mod ) a = a ( 1)/ (mod ) Examle. Suose = 13 and a = 10. Then a ( 1)/ = 10 6 = 1 (mod 13). Hence, 10 = 1, and x = 10 (mod 13) should have a solution. Indeed, 13 7 = 49 = 10 (mod 13). 4

Lemma. If a = b (mod ), then a = b Proof. If a = b (mod ), then x = a (mod ) if and only if x = b (mod ). Thus, one of these equations is solvable or not solvable if and only if the same is true for the other which means a = b Note that I can use this result to aly Euler s formula to a for a < 0 by simly relacing a with b > 0 such that a = b (mod ). Lemma. Let be an odd rime, a,b > 0, (a,) = (b,) = 1. Then a b = ab Proof. By Euler, a b = a ( 1)/ b ( 1)/ (mod ), and ab = (ab) ( 1)/ (mod ). Therefore, a b = ab (mod ). The two sides of this equation are ±1. Since is an odd rime, the two sides can t differ by. Hence, they must be equal as integers: a b = ab Corollary. Let be an odd rime, a > 0, (a,) = 1. Then a = 1. You can use the results above to comute a for secific values of a and arbitrary. Lemma. { 1 1 if = 4k+1 = 1 if = 4k + 3. Proof. By Euler s formula, 1 = 1 = ( 1) ( 1)/ = ( 1) ( 1)/ = { { ( 1) k if = 4k +1 1 if = 4k +1 ( 1) k+1 if = 4k + 3 = 1 if = 4k + 3. Using Gauss s lemma, which I ll rove shortly, you can also show that = ( 1) ( 1)/8. Note that the exonent on the right is actually an integer: Since = k +1, 1 = 4k(k +1). And 4k(k +1) is divisible by 8, because one of k, k +1, must be even. 5

Examle. 1 = 1, because 13 = 4 3+1. Thus, x = 1 (mod 13) has solutions. And in fact, 13 5 = 5 = 1 = 1 (mod 13). Likewise, 1 = 1, because 3 = 4 5+3. Hence, x = 1 (mod 3) has no solutions. 3 Finally, = ( 1) (7 1)/8 = 1. 7 Therefore, x = (mod 7) has solutions. x = 3 works, for instance. c 015 by Bruce Ikenaga 6