Every odd composite integer has an Euler witness. For a nonsquarefree integer, a base congruent to modulo a repeated prime factor fails the Euler congruence by the binomial theorem. For a squarefree integer, use the Chinese remainder theorem to choose a base that is a quadratic nonresidue modulo one prime factor and modulo another. Its Jacobi symbol is , while its power is modulo the second factor.
Suppose is a quadratic nonresidue. On the nonzero residue classes modulo , define the involution
It is an involution because . A fixed point would satisfy , which is excluded by the quadratic nonresidue hypothesis. Thus it partitions the classes into disjoint pairs , each with product . Consequently
Now evaluate the same product by pairing every class with its own modular inverse. The only classes equal to their modular inverses solve and hence are and . All other pairs have product one. The complete product is therefore , so
Together with the preceding part, this is Euler's criterion; the pairing argument establishes the converse without assuming it.
For coefficients supported on an interval of length , write and . The variance form of the large sieve states
The constant is absolute. One may take the explicit right side , by orthogonality of roots of unity and the exponential-sum large sieve proved in Question 2.
Take , , and the indicator function of the -smooth numbers up to . Applying the given smooth-number density with parameter gives
with a harmless adjustment of the constant for integer endpoints. If an odd prime has least quadratic nonresidue , then : a quadratic nonresidue always occurs among . Every prime factor of every selected smooth number is thus a nonzero quadratic residue modulo . By the multiplicativity of the Legendre symbol, every selected number is a nonzero quadratic residue modulo .
There are nonzero quadratic nonresidue classes, and on all of them. Their contribution to the variance is at least
If denotes the number of exceptional primes, the variance form of the large sieve, with , yields . Consequently
This is the bounded exceptional primes for least quadratic nonresidues argument. Using an interval of length is what matches the term; an interval of length would not give a bounded exceptional set.
True. Since is not a square, some exponent is odd. Choose a quadratic nonresidue modulo that and choose residue one at every other prime. The Chinese remainder theorem produces a unit modulo with . Multiplication by permutes the residue classes modulo . Thus, by multiplicativity of the Jacobi symbol,
The sum is therefore . Nonunits contribute zero, so the permutation argument covers every term.
True. First suppose with maximal. By the Chinese remainder theorem, choose and modulo all other prime-power factors. This is a unit, with Jacobi symbol one, because it is one modulo every prime. For , the binomial theorem gives
because and all higher terms contain . It is therefore a witness to the desired failure.
If is square-free and composite, it has at least two prime factors. Choose to be a quadratic nonresidue at one prime and one at every other prime, again using the Chinese remainder theorem. Then . At a different odd prime , however, . These two cases prove that every odd composite has an Euler-Jacobi witness, unlike the situation for the ordinary Fermat primality test.
If , square-freeness gives the cuspidal reduction . Its nonsingular group is isomorphic to the additive group , so it is cyclic of order .
Suppose . The reduction is an elliptic curve. Since , is a quadratic nonresidue. Pairing with in the quadratic-character sum and using
shows that the two contributions cancel. Therefore . The three roots are distinct, so the full 2-torsion is rational. A cyclic group has at most two elements killed by , hence is noncyclic. Thus
If the positive odd integer has prime factorization
its Jacobi symbol is
where each factor is a Legendre symbol; by convention . Thus the symbol is zero exactly when .
The quadratic reciprocity law for the Jacobi symbol says that for coprime positive odd integers ,
To prove it, write and . The quadratic reciprocity law for distinct odd primes states
Multiplying this identity over with multiplicities gives the required product of Jacobi symbols. Its sign exponent modulo two is
because multiplication of odd integers adds the quantities modulo two. This proves the law.
For the requested value, two applications of reciprocity give
since , , and is a quadratic nonresidue modulo .
Write . Choose a quadratic nonresidue . Multiplication by permutes , while multiplicativity of the Legendre symbol gives . Therefore
so the complete Legendre-symbol sum is zero.
Since and , the bijection reduces the next sum to . Count pairs satisfying . On one hand their number is
On 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
Put . The odd integer is an Euler pseudoprime to the coprime base when
where is the Jacobi symbol.
Let be the unit group of residue classes modulo , and partition it into the set of bases satisfying the displayed congruence and the set of Euler witnesses that do not. If , multiplication by maps injectively into : indeed, if and also lay in , then the multiplicativity of the Jacobi symbol would give
Cancelling the invertible congruence for would say that , a contradiction. Hence , so at least half of the coprime bases are witnesses.
It remains to construct one witness for every odd composite number . If is not squarefree, choose an odd prime number with . The Chinese remainder theorem gives a unit such that for the full power and modulo every other prime-power factor. The binomial theorem gives
Since , this is neither nor modulo , whereas the Jacobi symbol is always or . Thus is a witness.
If is squarefree and composite, choose distinct primes . By the Chinese remainder theorem, choose to be a quadratic nonresidue modulo and to satisfy modulo every other prime divisor of . Then , while , so the Euler congruence again fails. This proves the existence of an Euler witness for every odd composite integer.
Euler's criterion states that for an odd prime number and ,
where the right-hand side is the Legendre symbol.
Let be a primitive root modulo . Its multiplicative order is , so . This power has square , and the only roots of modulo the odd prime are . Therefore
Euler's criterion now gives , so every primitive root is a quadratic nonresidue.
Now let be a Fermat prime, with . The number of primitive roots modulo is
There are also exactly quadratic nonresidues. Since every primitive root is a nonresidue, these equally large sets coincide. Thus every quadratic nonresidue modulo is a primitive root, as summarized by Quadratic nonresidues modulo a Fermat prime.
Finally, and . Quadratic reciprocity therefore gives
Hence is a quadratic nonresidue modulo , and consequently
Let . Its minimal polynomial is , whose discriminant is . Since , the prime does not divide the index , so the Dedekind factorization theorem applies at . In ,
The quadratic factor has discriminant , which is a quadratic nonresidue modulo , so it is irreducible. Therefore
where
Their residue-field degrees are one and two. Both factors of occur with multiplicity one, so both prime-ideal exponents are one. Hence neither nor is ramified.