A prime number is an integer whose only positive divisors are and . Every integer greater than one has a prime factorization; in particular it has a prime divisor.
To prove infinitely many primes congruent to minus one modulo six, suppose a finite list contains all such primes, and put ; the empty product is one. The integer is coprime to , so each prime factor is congruent to or modulo . If all its prime factors, counted with multiplicity, were congruent to , their product would also be congruent to . But . Hence some prime divisor satisfies . None of the listed primes divides , since . This contradicts completeness of the list.
For infinitely many primes congruent to one modulo six, suppose instead that lists every prime congruent to modulo , and use
It is odd. Since each listed prime is coprime to , , so and does not divide it. Any prime divisor is therefore greater than and satisfies the modular congruence
The allowed quadratic-congruence result gives . Yet , and , so no listed prime divides . Again there is a new prime in the required residue class. Thus both residue classes and contain infinitely many primes.