Euclid's theorem Created 2026-10-05 Updated 2026-10-14
There are infinitely many prime numbers. Indeed, for any finite list of prime numbers , the integer has a prime factor, by the fundamental theorem of arithmetic. None of the listed prime numbers divides , since each divides and a common divisor would divide . Thus no finite list contains all prime numbers. The constructed need not itself be a prime number.
For example, the first six prime numbers give
Both prime factors lie outside the original list, although is a composite number. The construction defeats a proposed complete list; it is not a formula guaranteed to produce a prime number. Book IX, Proposition 20 of Euclid's Elements explicitly considers both possibilities, prime and composite. [ref].
Euler totient function Created 2026-09-24 Updated 2026-10-13
Euler's totient function is the arithmetic function
It counts the congruence classes modulo represented by integers coprime to . In particular, , since . For , the coprime integers among are , so ; they form a reduced residue system. [ref]
Counting these congruence classes is useful because they are exactly the classes with modular multiplicative inverses. Their number supplies the exponent in Euler theorem. Möbius inversion gives the product formula
where runs over distinct prime factors of . Thus for prime powers with , and . The product for is an empty product, so it gives the same convention .
The nonnegative arithmetic function counts the repeated occurrences beyond the first of each prime factor. Its expectation under uniform sampling from is bounded by , independently of .
Factor base 2026-10-14
A factor base is a finite set of small prime numbers over which selected auxiliary integers are completely factored. Some methods also record a sign coordinate for , which is not a prime number. A positive integer supported entirely on the chosen factor base gives an exponent vector; reducing that vector modulo two records which prime exponents are odd integers. The product is a square of a number precisely when every prime exponent is an even integer.
For the original toy , use factor base and the two relations
The residues have exponent vectors and in the order . Adding the two vectors modulo two gives , so multiplying the residues gives . Consequently
and and . Neither individual residue was a square; combining the relations made all exponents even.
Figure 1.
A factor base turns two smooth relations into a congruence of squares through exponent parity
. The original example uses the ordered factor base . The rows and add to zero modulo two, giving residue product . The product of the original inputs is ; greatest common divisor calculations then extract seven and eleven. Details.
In a larger collection, choose relations with positive residues . If a nonempty selection has an even sum in every exponent coordinate, set
Then . Finding such a selection is a linear dependence problem over the finite field : the indicator vector of the chosen relations belongs to the kernel of a linear map given by the parity matrix. This is why a problem about prime factors recruits linear algebra. The final congruence of squares may still be trivial, so another selection can be needed. [ref].
There is a tradeoff: a small factor base gives a smaller parity matrix, but fewer auxiliary integers factor completely over it. A larger factor base accepts more relations but makes the linear algebra larger. Negative auxiliary values need an additional sign coordinate, and a selected product needs even sign parity as well as even prime exponents. Pomerance's account explains this balance and the historical development of combining smooth relations; the toy example omits algorithm-specific sieving and running-time claims. [ref].
Fermat number Created 2026-10-07 Updated 2026-10-13
A Fermat number is the positive integer , indexed by a nonnegative integer . The first five are , all prime numbers; the next is the composite number . This family offers a compact lesson in number theory: a very persuasive finite pattern can fail, while an exact divisibility relation settles a gigantic case with little computation.
Figure 1.
Exact Fermat numbers: five initial primes, a composite sixth term, and rapidly increasing decimal lengths
. Details.
Why does the exponent itself have the form ? Suppose is a positive integer with an odd integer factor . The polynomial factorization shows that is a proper divisor of . Consequently, if is a prime number, must be a power of two. That is a necessary condition, rather than a promise that the surviving candidates are prime.
The Fermat number product identity makes distinct Fermat numbers coprime integers. Thus every term has a prime factor absent from all earlier terms, whether or not that term is itself a prime number. This gives an explicit route to infinitely many different prime numbers, without establishing that infinitely many terms of this particular sequence are prime. Meanwhile the prime divisor of a Fermat number criterion filters possible factors through a small multiplicative order calculation.
The family also links arithmetic to Euclidean geometry: a constructible regular polygon can have a number of sides equal to a power of two times a product of distinct Fermat primes. The Gauss-Wantzel theorem gives the precise criterion. For instance, and qualify, but does not. The word "distinct" matters. Carl Pomerance describes this connection in Primality testing: then and now by Carl Pomerance (slide 18).
Historically, Leonhard Euler records Pierre de Fermat's proposed primality pattern, then refutes it by finding the factor of . His paper was presented in 1732 and published in 1738; those are different events, not competing dates for one publication.[ref]
A short modern check needs only two representations of :
In modular arithmetic these give and . Substitution yields , so . This verifies the factor directly; it does not claim to reconstruct Euler's search process.
Fermat test example 2026-10-14
For the Fermat primality test, a passing base satisfies . Passing proves only this modular congruence, not that is a prime number. An odd composite number that passes a coprime base is a Fermat pseudoprime to that base. A Carmichael number passes every coprime base, so even testing all the units would not certify that is a prime number. [ref]
This small table uses only the bases , each reduced modulo first. A numeric entry is : one passes, while any other numeric entry gives a Fermat witness. A "factor" entry records a proper greatest common divisor and stops before modular exponentiation. The prime/composite classification is independently established by trial division or the displayed prime factorization, not by the passing entries. These four bases are illustrative, with no asserted universal coverage or error probability.
Table 1.
Finite-base Fermat primality test examples with explicit greatest common divisor checks
.
Independent classification
2Prime numberZero residue: excluded111
7Prime number1111
15: composite number4Factor 3Factor 51
341: composite number15667Factor 11
561: composite number1Factor 31Factor 11
For , and , so . Yet and , so three is a Fermat witness. One coprime base passes and another fails: being a Fermat pseudoprime depends on the base. Choosing eleven instead reveals the proper factor through .
For , every coprime base passes: each of divides , so Fermat's little theorem gives modulo each prime factor; the Chinese remainder theorem combines the three modular congruences. Equivalently, the Carmichael function gives . Bases two and five have greatest common divisor one and pass, but , and expose factors. The qualification "coprime" is therefore crucial even for a Carmichael number.
The Fermat primality test is useful because a Fermat witness can prove compositeness using repeated squaring without finding a factor. Its failure to certify a passing candidate motivates stronger primality testing methods such as the Miller-Rabin primality test.
Fundamental theorem of arithmetic Created 2026-09-24 Updated 2026-10-14
Every integer is a product of prime numbers, uniquely up to reordering the factors. More precisely, there are unique distinct prime numbers and unique positive integer exponents such that
In the header's displayed form, is the prime valuation, the exponent of in this prime factorization; it is zero when does not divide . Reordering or regrouping the prime factors does not give a different prime factorization.
For , repeated division gives , , , then , , and . Thus
Its nonzero prime valuations are , and . Recording only the distinct prime factors would lose the difference between and .
This turns divisibility into coordinatewise comparison of nonnegative exponents. A positive divisor of chooses an exponent from for , from for , and from for , giving positive divisors. The greatest common divisor takes the smaller exponent at each prime number; the least common multiple takes the larger. The theorem is a structural description, not an assertion that finding the factors of every large integer is computationally easy.
In general, for positive integers , the exact divisibility criterion is
For example, divides , with quotient , whereas does not: it requires four factors of two, but supplies only three. Both use only prime factors of , so membership in that list alone does not establish divisibility. Every positive divisor of is uniquely with , , . Sorted, all 24 positive divisors are
Thus the divisor function gives . These include divisors that are composite numbers, as well as the prime factors and one.
For another positive integer , the prime valuations give exact formulas for the greatest common divisor and least common multiple:
With and , their prime valuations at are and . The smaller exponents give , and the larger give , hence
Indeed, , , and . The same rules also explain : the smaller and larger exponents sum to the two original exponents. Here .
Figure 1. . The upper table compares exponents at the prime numbers for and , then takes their columnwise minimum and maximum. The lower tables enumerate for and ; each cell gives one positive divisor. Details.
The useful change of viewpoint is that multiplication becomes addition of prime valuations, , and divisibility becomes comparison. Many different-looking calculations therefore share one representation. The prime valuations are coordinates for multiplication, rather than digits in positional notation: they do not turn ordinary addition of integers into coordinatewise addition.
Different intermediate splits lead to the same prime ingredients. Starting with gives and ; starting with gives and . Continuing to split the composite numbers produces the same multiset of prime factors: three twos, two threes, and one five. The factorization tree records choices in the calculation, while the prime factorization records the invariant result.
Figure 2.
Two factorization trees for give the same prime factorization
. Details.
The proof outline explains the uniqueness. Existence follows by splitting a composite number into smaller factors until only prime numbers remain. For uniqueness, Euclid's lemma says that a prime factor of one product must divide one factor of any other prime product equal to it. That factor must be the same prime number; cancel it and repeat. The crucial divisibility step appears in Book VII, Proposition 30 of Euclid's Elements. [ref]
The ancient text supplies specific precursors to the modern statement: Book VII, Proposition 31 establishes that every composite number has a prime factor, and Book IX, Proposition 14 excludes any new prime factor from the least common multiple of given prime numbers. These are the propositions being cited, rather than the complete modern exponent formulation of the fundamental theorem of arithmetic. [ref] [ref]
Excluding one from the prime numbers keeps uniqueness meaningful: otherwise would give different collections of supposed prime factors. For , the natural convention is the empty product, equal to one, with no prime factors and all prime valuations zero.
Integer factorization 2026-10-13
Integer factorization seeks the prime factorization of a positive integer . For , this means identifying its prime factors and their multiplicities; one has the empty prime factorization. Finding one proper divisor is useful progress, but need not finish the job: factor and further until all factors are prime numbers.
For example, is a semiprime, whereas has three prime factors. Primality testing asks whether a proposed integer is prime; it need not return a factor when the answer is no. Trial division is a direct factoring method: try division by small prime numbers until a divisor is found. More elaborate methods obtain a proper divisor through a greatest common divisor of with a specially constructed integer.
The beautiful trick in congruence of squares is that two integers with equal squares modulo can reveal different factors through their sum and difference. In the worked example, gives and . Computing those greatest common divisors uses the Euclidean algorithm; it does not require trying every potential factor. A factor base supplies a systematic way to construct useful equal-square relations. [ref].
This connection is useful in cryptography because recovering the factors of an RSA cryptosystem modulus defeats the factoring assumption behind its construction. That application concerns large, carefully chosen inputs; the small examples here explain the arithmetic mechanism and are not benchmarks or estimates of present cryptographic security.
Integers with all prime factors congruent to one modulo four Created 2026-10-06 Updated 2026-10-14
A positive integer in this set has no prime factor equal to two or congruent to three modulo four. Its prime factors all lie in the residue class one modulo four. For example belongs, while does not, even though itself is congruent to one modulo four. A half-dimensional interval sieve bounds the count in an interval of length by .