{'fraction_non_alphanumeric': 0.061933534743202415, 'fraction_numerical': 0.02416918429003021, 'mean_word_length': 3.58477508650519, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
The Quadratic Residues —1 and —3

Let p be an odd prime. Then -1 is a quadratic residue (mod p) if and only if p 1 (mod 4), and 3 is a quadratic residue (mod p) if and only if p = 1 (mod 6). These results are well known. The first follows immediately from Euler's criterion and it appears as a theorem in just about every book in which quadratic residues are discussed. The proof of the result about -3 usually requires a little more effort and the law of quadratic reciprocity. The purpose of this note is to show that the "if' part of both results follows from Lagrange's theorem in group theory and the theory of algebraic field extensions. Let Zp be the field of integers (mod p). Assume that -1 is not a square (quadratic residue) in Zp. The quadratic extension Zp( -1) has p2 elements. Thus its group of nonzero elements Zp( -)* has p2_ 1 elements and the subgroup Zp* (the group of nonzero elements in Zp) has p 1 elements. The group we want to examine is the factor group Zp( -1)*/Zp*, with p + 1 elements. A direct calculation shows that the coset represented by 1 + has order 4. Thus 4 divides p + 1, which means that p -1 (mod 4). To prove the result about -3, extend Zp to Zp( -3). The order of the coset represented by 3 + -3 in the factor group Zp(-30)*/Zp* is 6. So, again by Lagrange's theorem, p -1 (mod 6).