Jacobi symbols and alication to rimality Setember 19, 018 1 The grou Z/Z We review the structure of the abelian grou Z/Z. Using Chinese remainder theorem, we can restrict to the case when = k is a rime ower. If k = 1 the grou is cyclic. Assume k. The cardinality of Z/ k Z is k. Since and k are corime, the grou Z/ k Z is the direct roduct of two subgrous with resective orders 1 and k. One can be more recise. We have the eact seuence 1 U 1 Z/ k Z F 1 1 where U 1 is the subgrou of all mod k such that 1 mod. Let V be the grou of solutions to the euation = 1. According to Hensel lemma, there are at least 1 such roots, and reduction modulo is a bijection from V onto F. The intersection of V and U 1 is trivial. For every n 1 let U n Z/Z be the subgrou consisting of all residues congruent to 1 modulo n. So {1} = U k U k... U 1. For every 1 n k 1, the uotient U n /U n+1 is cyclic of order and 1 + n is a generator of it. Indeed, the ma 1 + a n mod n+1 a mod is and isomorhism from U n /U n+1, onto Z/Z, +. Lemma 1 Let n be an integer such that 1 n k if 3 and n k if =. Let U n U n+1. Then U n+1 U n+. Indeed = 1 + a n and a is rime to. If 3 one comutes = 1+a n = 1+a n+1 + a m nm +a n 1+a n+1 mod n+ m since n n +. If = and n then m = 1 + a n = 1 + a n+1 + a n 1 + a n+1 mod n+ 1
since n n +. We deduce that if 3 then U 1 is cyclic of order k and 1 + is a generator. For =, we only rove that U is cyclic of order k and 5 is a generator. If is odd the grou Z/ k Z is isomorhic to Z/ 1Z Z/ k Z. For = one checks that U 1 = {1, } U so Z/ k Z is isomorhic to Z/Z Z/ k Z. The Legendre symbol Let be and odd rime. For every integer one defines the Legendre symbol as follows : 1. = 0 if divides,. = 1 if is a non-zero suare modulo, 3. = if is not a suare modulo. The ma is a grou homomorhism from F onto {1, }. One checks that = mod. So we obtain a first method to comute this Legendre symbol. The famous uadratic recirocity law states that Theorem 1 If and are two odd ositive distinct rimes then = 4. There are many roofs for this theorem. For eamle set Φ = 1 + + + and let A F [] be an irreducible factor of Φ modulo. Set L = F []/A and let ζ = mod A L. This is a -th root of unity in the field L. Question 1 Show that ζ is a rimitive -th root of unity its multilicative order is eactly.
The so called Gauss sum τ = F ζ is an element of the field L. One can show that τ = L. So τ is a suare root of in the algebraic closure of F. This suare root is in F if and only if τ = τ. On checks that τ = τ. So is a suare modulo if and only if = 1. This finishes the roof. We shall need also the following theorem Theorem For an odd rime = 8. Observe that if is an odd integer then = 1 + k and k + 1 = 1 + 4kk + 1 = 1 + 8 is congruent to 1 modulo 8. And kk + 1/ is even if and only if k is congruent to 0 or 3 modulo 4 that is congruent to 1 or 7 modulo 8. ow let A F [] be an irreducible factor of 4 + 1 modulo and set ζ = mod A the class of in F []/A. Question Prove that ζ is a rimitive 8-th root of 1. One checks that ζ + ζ =. So we have a suare root of in the algebraic closure of F. So is a suare if and only if this suare root is in F that is α = α. But α = ζ + ζ where the eonents only matter modulo 8. If is congruent to 1 or modulo 8 one deduces that α = α. If is congruent to 3 or 5 modulo 8 one checks that α = α. This roves formula and the theorem. 3 The Jacobi symbol Assume 3 is an odd integer and let = i e i i its rime decomosition. The Jacobi symbol is defined as a generalization of the Legendre symbol. One sets = ei. i i 3
This symbol only deends on the congruence class of modulo. It has many evident multilicative roerties inherited from the Lengendre symbol. For a eamle = 0 if and only if a are b not corime. b The uadratic recirocity law etends to this symbol. Theorem 3 Gauss Let M 3 and 3 two odd corime integers. One has = M, = M 8, and M M M = M 4. M Thanks to this theorem we can uickly comute the Jacobi symbol by successive Euclidean divisions. ote that if is not a rime, the Jacobi symbol does not distinguish uadratic residues. For eamle if = is the roduct of two odd rimes and if is rime to then = 1 means that either is a suare modulo and modulo, or that is not a suare modulo nor modulo. In the latter case one sometimes says that is a false suare. 4 The Solovay-Strassen rimality test Let be an odd integer. Let χ 1 : Z/Z Z/Z and χ : Z/Z Z/Z be the two grou homomorhisms defined by and χ 1 : mod χ : mod. We set χ 0 = χ /χ 1. It is evident that χ 0 is trivial if is a rime. One has the Lemma If is odd and comosite, then there eists an mod in Z/Z such that χ 0 1. Assume first that is divisible by a non-trivial suare : there eists an odd rime and an integer k such that k divides eactly. Set M = / k. Let G Z/Z be the subgrou consisting of all residues congruent to 1 modulo M. This is a cyclic grou of order k. The restriction of the Jacobi symbol to this sub-grou is trivial. The restriction of χ 1 is not because is rime to. Assume now that is suare-free. Let be an odd rime factor of and set M = /. Let be an integer congruent to 1 modulo M and which is not a suare modulo. Then χ = and χ 1 = 1 mod M. So χ 1 χ. 4
If is an odd comosite integer then the kernel of χ 0 is a strict subgrou of Z/Z. Its cardinality is. We have at least one chance over two to find χ 0 1 if is chosen at random uniformly in Z/Z. Since we have olynomial time algorithms to comute χ 1 and χ we obtain a robabilistic rimality test : 1. check that is odd;. ick at random in Z/Z and comute χ 1 and χ ; 3. if χ 1 χ, one knows that is comosite; 4. if χ 1 = χ, one cannot conclude... but one can try again! If is odd and comosite and if Z/Z is such that χ 1 = χ, one says that is a false witness. The roortion of false witnesses is at most 1/. 5