Legendre symbol Created 2026-09-24 Updated 2026-10-18
Its value depends only on the congruence class of modulo ; the displayed notation is a symbol, not division. The value zero handles separately from quadratic residues and quadratic nonresidues.[ref]
Quadratic Residues by Ben Lynn. Ben Lynn, Quadratic Residues, The Legendre Symbol: three values and dependence on an odd prime
For example, , , , and . The equality illustrates that choosing a different integer representative does not change the answer. An arbitrary odd composite denominator uses the Jacobi symbol, not the Legendre symbol. For instance,but two is not a square modulo fifteen: any such square root would also give a square root modulo three, where the only nonzero square is one. A Jacobi symbol of one therefore cannot replace the Legendre symbol's square test.
The Legendre symbol also counts square roots compactly. For every congruence class in the prime field ,The three cases give two, one and zero solutions for a quadratic residue, zero and a quadratic nonresidue, respectively. This is useful when counting solutions of modular congruences involving polynomials: a solvability question becomes a sum of Legendre symbols, as in the complete Legendre-symbol sum and quadratic Legendre-symbol correlation.
Number of consecutive nonzero quadratic residues modulo an odd prime Created 2026-09-29 Updated 2026-11-05
For an odd prime , the number of integers such that both and are quadratic residues modulo isFor example, modulo the quadratic residues are . The qualifying pairs are and , giving .
Write for the Legendre symbol. On the specified range neither input is zero, so the indicator of the required event is . Expand and sum. The complete Legendre-symbol sum givesThe quadratic Legendre-symbol correlation gives : extending to the full finite field only adds the zero terms at . Thus the count is . The first supplementary law for quadratic reciprocity identifies and completes the formula.
Past exam of the mathematics course of the University of Cambridge 2003 ib Paper 1 17G d Solution Created 2026-09-24 Updated 2026-10-14
Inversion permutes the nonzero residues excluding . Hence the result of part (c) changes the requested sum intoThere are exactly nonzero squares: the map on nonzero residues identifies exactly the pairs , because implies in the finite field. Thus there are equally many nonzero squares and nonsquares, and the complete Legendre-symbol sum is zero. Removing the term leaves
Past exam of the mathematics course of the University of Cambridge 2020 ii Paper 3 11H iii Solution Created 2026-09-24 Updated 2026-09-29
Write . Choose a quadratic nonresidue . Multiplication by permutes , while multiplicativity of the Legendre symbol gives . Thereforeso the complete Legendre-symbol sum is zero.
Since and , the bijection reduces the next sum to . Count pairs satisfying . On one hand their number isOn the other hand , and every gives exactly one pair by , . There are therefore pairs, proving the quadratic Legendre-symbol correlation
For , the indicator that both and are quadratic residues is . Summing and using the two identities above gives the number of consecutive nonzero quadratic residues modulo an odd prime
Weighted complete Legendre-symbol sum Created 2026-09-24 Updated 2026-11-05
For the first statement, the first supplementary law for quadratic reciprocity gives , where is the Legendre symbol. Pairing with givesThe same pairing in the complete Legendre-symbol sum shows that this half sum is zero, proving the exact equality.
For the second statement, multiplication by permutes the nonzero residue classes modulo . Reducing the weighted sum modulo and using multiplicativity of the Legendre symbol therefore gives . The coefficient is either or , and hence is invertible for . Thus . The restriction is necessary: at , .