Main Page | See live article | Alphabetical index

# Legendre symbol

The Legendre symbol is used by mathematicians in the theory of numbers, particularly in the fields of factorization and quadratic residues. It is named after the French mathematician Adrien-Marie Legendre.

If p is a prime number and a is an integer relatively prime to p, then we define the Legendre symbol (a/p) to be:

• 1 if a is a square modulo p (that is to say there exists an integer x such that x2 = a mod p)
• -1 if '\'a is not a square modulo p''.
Furthermore, if a is divisible by p we define (a/p) = 0.

Euler proved that

if p is an odd prime. (We have (a/2) = 1 for all odd numbers a and (a/2) = 0 for all even numbers a.)
```
```
Thus we can see that the Legendre symbol is completely multiplicative, i.e. (ab/p) = (a/p)(b/p), and a Dirichlet character.

The Legendre symbol can be used to compactly formulate the law of quadratic reciprocity. This law relates (p/q) and (q/p) and, together with the multiplicity, can be used to quickly compute Legendre symbols.

(a/b) where b is composite is defined as the product of (a/p) over all prime factors p of b, including repetitions. This is called the Jacobi symbol. The Jacobi symbol can be 1 without a being a quadratic residue of b.
{"ft_lang_label":"__label__en","ft_lang_prob":0.90464854,"math_prob":0.9939387,"size":682,"snap":"2022-05-2022-21","text_gpt3_token_len":172,"char_repetition_ratio":0.13864307,"word_repetition_ratio":0.0,"special_character_ratio":0.2346041,"punctuation_ratio":0.104166664,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9972522,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2022-05-20T00:15:45Z\",\"WARC-Record-ID\":\"<urn:uuid:12b4b5bc-64b1-4a5f-aeb0-ae098d780d52>\",\"Content-Length\":\"4793\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:c7e06d91-549d-42c7-9405-3ff67242cead>\",\"WARC-Concurrent-To\":\"<urn:uuid:f884d12e-3f2f-4db8-9b72-801523249d37>\",\"WARC-IP-Address\":\"23.227.169.68\",\"WARC-Target-URI\":\"http://www.fact-index.com/l/le/legendre_symbol.html\",\"WARC-Payload-Digest\":\"sha1:RAQDPEALBOT62XU362TAZ25YPLRMSMF6\",\"WARC-Block-Digest\":\"sha1:MI3HHDZO3OXDHKVFZTGOUIV4RQP4AVNZ\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2022/CC-MAIN-2022-21/CC-MAIN-2022-21_segments_1652662530553.34_warc_CC-MAIN-20220519235259-20220520025259-00018.warc.gz\"}"}