Quadratic Congruences

Total Page:16

File Type:pdf, Size:1020Kb

Quadratic Congruences 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.
Recommended publications
  • Chapter 9 Quadratic Residues
    Chapter 9 Quadratic Residues 9.1 Introduction Definition 9.1. We say that a 2 Z is a quadratic residue mod n if there exists b 2 Z such that a ≡ b2 mod n: If there is no such b we say that a is a quadratic non-residue mod n. Example: Suppose n = 10. We can determine the quadratic residues mod n by computing b2 mod n for 0 ≤ b < n. In fact, since (−b)2 ≡ b2 mod n; we need only consider 0 ≤ b ≤ [n=2]. Thus the quadratic residues mod 10 are 0; 1; 4; 9; 6; 5; while 3; 7; 8 are quadratic non-residues mod 10. Proposition 9.1. If a; b are quadratic residues mod n then so is ab. Proof. Suppose a ≡ r2; b ≡ s2 mod p: Then ab ≡ (rs)2 mod p: 9.2 Prime moduli Proposition 9.2. Suppose p is an odd prime. Then the quadratic residues coprime to p form a subgroup of (Z=p)× of index 2. Proof. Let Q denote the set of quadratic residues in (Z=p)×. If θ :(Z=p)× ! (Z=p)× denotes the homomorphism under which r 7! r2 mod p 9–1 then ker θ = {±1g; im θ = Q: By the first isomorphism theorem of group theory, × jkerθj · j im θj = j(Z=p) j: Thus Q is a subgroup of index 2: p − 1 jQj = : 2 Corollary 9.1. Suppose p is an odd prime; and suppose a; b are coprime to p. Then 1. 1=a is a quadratic residue if and only if a is a quadratic residue.
    [Show full text]
  • Number Theory Summary
    YALE UNIVERSITY DEPARTMENT OF COMPUTER SCIENCE CPSC 467: Cryptography and Computer Security Handout #11 Professor M. J. Fischer November 13, 2017 Number Theory Summary Integers Let Z denote the integers and Z+ the positive integers. Division For a 2 Z and n 2 Z+, there exist unique integers q; r such that a = nq + r and 0 ≤ r < n. We denote the quotient q by ba=nc and the remainder r by a mod n. We say n divides a (written nja) if a mod n = 0. If nja, n is called a divisor of a. If also 1 < n < jaj, n is said to be a proper divisor of a. Greatest common divisor The greatest common divisor (gcd) of integers a; b (written gcd(a; b) or simply (a; b)) is the greatest integer d such that d j a and d j b. If gcd(a; b) = 1, then a and b are said to be relatively prime. Euclidean algorithm Computes gcd(a; b). Based on two facts: gcd(0; b) = b; gcd(a; b) = gcd(b; a − qb) for any q 2 Z. For rapid convergence, take q = ba=bc, in which case a − qb = a mod b. Congruence For a; b 2 Z and n 2 Z+, we write a ≡ b (mod n) iff n j (b − a). Note a ≡ b (mod n) iff (a mod n) = (b mod n). + ∗ Modular arithmetic Fix n 2 Z . Let Zn = f0; 1; : : : ; n − 1g and let Zn = fa 2 Zn j gcd(a; n) = 1g. For integers a; b, define a⊕b = (a+b) mod n and a⊗b = ab mod n.
    [Show full text]
  • Lecture 10: Quadratic Residues
    Lecture 10: Quadratic residues Rajat Mittal IIT Kanpur n Solving polynomial equations, anx + ··· + a1x + a0 = 0 , has been of interest from a long time in mathematics. For equations up to degree 4, we have an explicit formula for the solutions. It has also been shown that no such explicit formula can exist for degree higher than 4. What about polynomial equations modulo p? Exercise 1. When does the equation ax + b = 0 mod p has a solution? This lecture will focus on solving quadratic equations modulo a prime number p. In other words, we are 2 interested in solving a2x +a1x+a0 = 0 mod p. First thing to notice, we can assume that every coefficient ai can only range between 0 to p − 1. In the assignment, you will show that we only need to consider equations 2 of the form x + a1x + a0 = 0. 2 Exercise 2. When will x + a1x + a0 = 0 mod 2 not have a solution? So, for further discussion, we are only interested in solving quadratic equations modulo p, where p is an odd prime. For odd primes, inverse of 2 always exists. 2 −1 2 −2 2 x + a1x + a0 = 0 mod p , (x + 2 a1) = 2 a1 − a0 mod p: −1 −2 2 Taking y = x + 2 a1 and b = 2 a1 − a0, 2 2 Exercise 3. solving quadratic equation x + a1x + a0 = 0 mod p is same as solving y = b mod p. The small amount of work we did above simplifies the original problem. We only need to solve, when a number (b) has a square root modulo p, to solve quadratic equations modulo p.
    [Show full text]
  • Consecutive Quadratic Residues and Quadratic Nonresidue Modulo P
    Consecutive Quadratic Residues And Quadratic Nonresidue Modulo p N. A. Carella Abstract: Let p be a large prime, and let k log p. A new proof of the existence of ≪ any pattern of k consecutive quadratic residues and quadratic nonresidues is introduced in this note. Further, an application to the least quadratic nonresidues np modulo p shows that n (log p)(log log p). p ≪ 1 Introduction Given a prime p 2, a nonzero element u F is called a quadratic residue, equiva- ≥ ∈ p lently, a square modulo p whenever the quadratic congruence x2 u 0mod p is solvable. − ≡ Otherwise, it called a quadratic nonresidue. A finite field Fp contains (p + 1)/2 squares = u2 mod p : 0 u < p/2 , including zero. The quadratic residues are uniformly R { ≤ } distributed over the interval [1,p 1]. Likewise, the quadratic nonresidues are uniformly − distributed over the same interval. Let k 1 be a small integer. This note is concerned with the longest runs of consecutive ≥ quadratic residues and consecutive quadratic nonresidues (or any pattern) u, u + 1, u + 2, . , u + k 1, (1) − in the finite field F , and large subsets F . Let N(k,p) be a tally of the number of p A ⊂ p sequences 1. Theorem 1.1. Let p 2 be a large prime, and let k = O (log p) be an integer. Then, the ≥ finite field Fp contains k consecutive quadratic residues (or quadratic nonresidues or any pattern). Furthermore, the number of k tuples has the asymptotic formulas p 1 k 1 (i) N(k,p)= 1 1+ O , if k 1.
    [Show full text]
  • STORY of SQUARE ROOTS and QUADRATIC RESIDUES
    CHAPTER 6: OTHER CRYPTOSYSTEMS and BASIC CRYPTOGRAPHY PRIMITIVES A large number of interesting and important cryptosystems have already been designed. In this chapter we present several other of them in order to illustrate other principles and techniques that can be used to design cryptosystems. Part I At first, we present several cryptosystems security of which is based on the fact that computation of square roots and discrete logarithms is in general unfeasible in some Public-key cryptosystems II. Other cryptosystems and groups. cryptographic primitives Secondly, we discuss one of the fundamental questions of modern cryptography: when can a cryptosystem be considered as (computationally) perfectly secure? In order to do that we will: discuss the role randomness play in the cryptography; introduce the very fundamental definitions of perfect security of cryptosystem; present some examples of perfectly secure cryptosystems. Finally, we will discuss, in some details, such very important cryptography primitives as pseudo-random number generators and hash functions . IV054 1. Public-key cryptosystems II. Other cryptosystems and cryptographic primitives 2/65 FROM THE APPENDIX MODULAR SQUARE ROOTS PROBLEM The problem is to determine, given integers y and n, such an integer x that y = x 2 mod n. Therefore the problem is to find square roots of y modulo n STORY of SQUARE ROOTS Examples x x 2 = 1 (mod 15) = 1, 4, 11, 14 { | } { } x x 2 = 2 (mod 15) = and { | } ∅ x x 2 = 3 (mod 15) = { | } ∅ x x 2 = 4 (mod 15) = 2, 7, 8, 13 { | } { } x x 2 = 9 (mod 15) = 3, 12 QUADRATIC RESIDUES { | } { } No polynomial time algorithm is known to solve the modular square root problem for arbitrary modulus n.
    [Show full text]
  • Phatak Primality Test (PPT)
    PPT : New Low Complexity Deterministic Primality Tests Leveraging Explicit and Implicit Non-Residues A Set of Three Companion Manuscripts PART/Article 1 : Introducing Three Main New Primality Conjectures: Phatak’s Baseline Primality (PBP) Conjecture , and its extensions to Phatak’s Generalized Primality Conjecture (PGPC) , and Furthermost Generalized Primality Conjecture (FGPC) , and New Fast Primailty Testing Algorithms Based on the Conjectures and other results. PART/Article 2 : Substantial Experimental Data and Evidence1 PART/Article 3 : Analytic Proofs of Baseline Primality Conjecture for Special Cases Dhananjay Phatak ([email protected]) and Alan T. Sherman2 and Steven D. Houston and Andrew Henry (CSEE Dept. UMBC, 1000 Hilltop Circle, Baltimore, MD 21250, U.S.A.) 1 No counter example has been found 2 Phatak and Sherman are affiliated with the UMBC Cyber Defense Laboratory (CDL) directed by Prof. Alan T. Sherman Overall Document (set of 3 articles) – page 1 First identification of the Baseline Primality Conjecture @ ≈ 15th March 2018 First identification of the Generalized Primality Conjecture @ ≈ 10th June 2019 Last document revision date (time-stamp) = August 19, 2019 Color convention used in (the PDF version) of this document : All clickable hyper-links to external web-sites are brown : For example : G. E. Pinch’s excellent data-site that lists of all Carmichael numbers <10(18) . clickable hyper-links to references cited appear in magenta. Ex : G.E. Pinch’s web-site mentioned above is also accessible via reference [1] All other jumps within the document appear in darkish-green color. These include Links to : Equations by the number : For example, the expression for BCC is specified in Equation (11); Links to Tables, Figures, and Sections or other arbitrary hyper-targets.
    [Show full text]
  • Chapter 21: Is -1 a Square Modulo P? Is 2?
    Chapter 21 Is −1 a Square Modulo p? Is 2? In the previous chapter we took various primes p and looked at the a’s that were quadratic residues and the a’s that were nonresidues. For example, we made a table of squares modulo 13 and used the table to see that 3 and 12 are QRs modulo 13, while 2 and 5 are NRs modulo 13. In keeping with all of the best traditions of mathematics, we now turn this problem on its head. Rather than taking a particular prime p and listing the a’s that are QRs and NRs, we instead fix an a and ask for which primes p is a a QR. To make it clear exactly what we’re asking, we start with the particular value a = −1. The question that we want to answer is as follows: For which primes p is −1 a QR? We can rephrase this question in other ways, such as “For which primes p does 2 (the) congruence x ≡ −1 (mod p) have a solution?” and “For which primes p is −1 p = 1?” As always, we need some data before we can make any hypotheses. We can answer our question for small primes in the usual mindless way by making a table of 12; 22; 32;::: (mod p) and checking if any of the numbers are congruent to −1 modulo p. So, for example, −1 is not a square modulo 3, since 12 ̸≡ −1 (mod 3) and 22 ̸≡ −1 (mod 3), while −1 is a square modulo 5, since 22 ≡ −1 (mod 5).
    [Show full text]
  • MULTIPLICATIVE SEMIGROUPS RELATED to the 3X + 1 PROBLEM
    MULTIPLICATIVE SEMIGROUPS RELATED TO THE 3x +1 PROBLEM ANA CARAIANI Abstract. Recently Lagarias introduced the Wild semigroup, which is inti- mately connected to the 3x +1Conjecture. Applegate and Lagarias proved a weakened form of the 3x +1 Conjecture while simultaneously characterizing the Wild semigroup through the Wild Number Theorem. In this paper, we consider a generalization of the Wild semigroup which leads to the statement of a weak qx+1 conjecture for q any prime. We prove our conjecture for q =5 together with a result analogous to the Wild Number Theorem. Next, we look at two other classes of variations of the Wild semigroup and prove a general statement of the same type as the Wild Number Theorem. 1. Introduction The 3x +1iteration is given by the function on the integers x for x even T (x)= 2 3x+1 for x odd. ! 2 The 3x +1 conjecture asserts that iteration of this function, starting from any positive integer n, eventually reaches the integer 1. This is a famous unsolved problem. Farkas [2] formulated a semigroup problem which represents a weakening of the 3x +1conjecture. He associated to this iteration the multiplicative semigroup W generated by all the rationals n for n 1. We’ll call this the 3x +1semigroup, T (n) ≥ following the nomenclature in [1]. This generating set is easily seen to be 2n +1 G = : n 0 2 3n +2 ≥ ∪{ } ! " because the iteration can be written T (2n + 1) = 3n +2and T (2n)=n. Farkas observes that 1= 1 2 W and that if T (n) W then n = n T (n) W .
    [Show full text]
  • Quadratic Residues (Week 3-Monday)
    QUADRATIC RESIDUES (WEEK 3-MONDAY) We studied the equation ax b mod m and solved it when gcd(a, m)=1. I left it as an exercise to investigate what happens ⌘ when gcd(a, m) = 1 [Hint: There are no solutions to ax 1 mod m]. Thus, we have completely understood the equation 6 ⌘ ax b mod m. Then we took it one step further and found simultaneous solutions to a set of linear equations. The next natural ⌘ step is to consider quadratic congruences. Example 1 Find the solutions of the congruence 15x2 + 19x 5 mod 11. ⌘ A We need to find x such that 15x2 + 19x 5 4x2 + 8x 5 (2x 1)(2x + 5) 0 mod 11. Since 11 is prime, this happens − ⌘ − ⌘ − ⌘ iff 2x 1 0 mod 11 or 2x + 5 0 mod 11. Now you can finish this problem by using the techniques described in the − ⌘ ⌘ previous lectures. In particular, 2 1 6 mod 11 and we have x 6 mod 11 or x 30 3 mod 11. − ⌘ ⌘ ⌘ ⌘ ⌅ So let’s start by investigating the simplest such congruence: x2 a mod m. ⌘ Definition 2 Let p a prime number. Then the integer a is said to be a quadratic residue of p if the congruence x2 a mod p ⌘ has a solution. More generally, if m is any positive integer, we say that a is a quadratic residue of m if gcd(a, m)=1 and the congruence x2 a mod m has a solution. If a is not a quadratic residue it’s said to be a quadratic non-residue.
    [Show full text]
  • Primality Testing and Sub-Exponential Factorization
    Primality Testing and Sub-Exponential Factorization David Emerson Advisor: Howard Straubing Boston College Computer Science Senior Thesis May, 2009 Abstract This paper discusses the problems of primality testing and large number factorization. The first section is dedicated to a discussion of primality test- ing algorithms and their importance in real world applications. Over the course of the discussion the structure of the primality algorithms are devel- oped rigorously and demonstrated with examples. This section culminates in the presentation and proof of the modern deterministic polynomial-time Agrawal-Kayal-Saxena algorithm for deciding whether a given n is prime. The second section is dedicated to the process of factorization of large com- posite numbers. While primality and factorization are mathematically tied in principle they are very di⇥erent computationally. This fact is explored and current high powered factorization methods and the mathematical structures on which they are built are examined. 1 Introduction Factorization and primality testing are important concepts in mathematics. From a purely academic motivation it is an intriguing question to ask how we are to determine whether a number is prime or not. The next logical question to ask is, if the number is composite, can we calculate its factors. The two questions are invariably related. If we can factor a number into its pieces then it is obviously not prime, if we can’t then we know that it is prime. The definition of primality is very much derived from factorability. As we progress through the known and developed primality tests and factorization algorithms it will begin to become clear that while primality and factorization are intertwined they occupy two very di⇥erent levels of computational di⇧culty.
    [Show full text]
  • On the Distribution of Quadratic Residues and Nonresidues Modulo a Prime Number
    MATHEMATICSOF computation VOLUME58, NUMBER197 JANUARY1992, PAGES 433-440 ON THE DISTRIBUTION OF QUADRATICRESIDUES AND NONRESIDUES MODULO A PRIME NUMBER RENÉ PERALTA Abstract. Let P be a prime number and a\,... ,at be distinct integers modulo P . Let x be chosen at random with uniform distribution in Z/>, and let y,; = x + a¡. We prove that the joint distribution of the quadratic characters of the y i 's deviates from the distribution of independent fair coins by no more than i(3 + \fP)IP ■ That is, the probability of (y\, ... , yt) matching any particular quadratic character sequence of length t is in the range (5)' ± i(3 + VP)/P . We establish the implications of this bound on the number of occurrences of arbitrary patterns of quadratic residues and nonresidues modulo P. We then explore the randomness complexity of finding these patterns in polynomial time. We give (exponentially low) upper bounds for the probability of failure achievable in polynomial time using, as a source of randomness, no more than one random number modulo P. 1. Introduction There is an extensive literature on the distribution of quadratic residues and nonresidues modulo a prime number. Much of it is dedicated to the question of how small is the smallest quadratic nonresidue of a prime P congruent to ±1 modulo 8. Gauss published the first nontrivial result on this problem: he showed that if P is congruent to 1 modulo 8, then the least quadratic nonresidue is less than 2y/P + 1 (art. 129 in [8]). The best upper bound currently known is 0(Pa) for any fixed a > l/4y/e and is due to Burgess [5].
    [Show full text]
  • Arxiv:1408.0235V7 [Math.NT] 21 Oct 2016 Quadratic Residues and Non
    Quadratic Residues and Non-Residues: Selected Topics Steve Wright Department of Mathematics and Statistics Oakland University Rochester, Michigan 48309 U.S.A. e-mail: [email protected] arXiv:1408.0235v7 [math.NT] 21 Oct 2016 For Linda i Contents Preface vii Chapter 1. Introduction: Solving the General Quadratic Congruence Modulo a Prime 1 1. Linear and Quadratic Congruences 1 2. The Disquisitiones Arithmeticae 4 3. Notation, Terminology, and Some Useful Elementary Number Theory 6 Chapter 2. Basic Facts 9 1. The Legendre Symbol, Euler’s Criterion, and other Important Things 9 2. The Basic Problem and the Fundamental Problem for a Prime 13 3. Gauss’ Lemma and the Fundamental Problem for the Prime 2 15 Chapter 3. Gauss’ Theorema Aureum:theLawofQuadraticReciprocity 19 1. What is a reciprocity law? 20 2. The Law of Quadratic Reciprocity 23 3. Some History 26 4. Proofs of the Law of Quadratic Reciprocity 30 5. A Proof of Quadratic Reciprocity via Gauss’ Lemma 31 6. Another Proof of Quadratic Reciprocity via Gauss’ Lemma 35 7. A Proof of Quadratic Reciprocity via Gauss Sums: Introduction 36 8. Algebraic Number Theory 37 9. Proof of Quadratic Reciprocity via Gauss Sums: Conclusion 44 10. A Proof of Quadratic Reciprocity via Ideal Theory: Introduction 50 11. The Structure of Ideals in a Quadratic Number Field 50 12. Proof of Quadratic Reciprocity via Ideal Theory: Conclusion 57 13. A Proof of Quadratic Reciprocity via Galois Theory 65 Chapter 4. Four Interesting Applications of Quadratic Reciprocity 71 1. Solution of the Fundamental Problem for Odd Primes 72 2. Solution of the Basic Problem 75 3.
    [Show full text]