Birthday problem Created 2026-10-13 Updated 2026-10-14
The birthday problem asks for the probability that at least two members of a group share a birthday. Use the explicit model of independent random variables taking labels with a uniform distribution on a finite set. Let and be integers. For calendar examples below, stipulate equally likely labels and omit leap days. For , the probability of at least one matching pair is
At , the empty product is one and . At , a repeat is certain by the pigeonhole principle. Count the complement to obtain the formula: the first label has choices, then a distinct second label has , and so forth, out of equally likely label sequences.[ref]
For the stipulated calendar, and . Only 23 people suffice to put the probability above one half. There are possible pairs, each with matching probability . The many comparison opportunities explain why a small group can contain a repeat.
Figure 1.
Any matching pair becomes likely much sooner than a match with one specified person
. Original exact computations under the independent uniform 365-label model. The solid curve allows every pair in a group of total size ; the lower curve requires a match with one designated member. The dashed curve is the exponential lower bound for any-pair collision probability. This is a model calculation, not observed birthday data. Details.
The distinction also matters for hash collisions. If independently generated outputs of a hash function are uniformly distributed over possible labels, the same counting formula governs repeats. The birthday square-root scale explains why looking for any repeated output requires far fewer labels than trying to match one predetermined output. The uniform-independent model is an assumption about those outputs; the birthday problem does not itself establish that a particular implementation meets it.
Empty sum 2026-10-14
An empty sum has no terms and is defined to be zero, the identity element for addition. This keeps the rule for combining sums valid when one index set is empty. In a Galton-Watson process, an empty generation contributes an empty sum of offspring counts, so the next generation is empty too. The corresponding convention for multiplication is the empty product, which equals one.
Euler totient function Created 2026-09-24 Updated 2026-10-20
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 .
Factorial Created 2026-09-24 Updated 2026-10-13
For a nonnegative integer , the factorial is the product of the positive integers from to , with the empty product equal to :
Thus , , , and . The factorial counts the permutations of distinct objects: arranging gives exactly . The choice tree in permutation shows the three choices for the first position, two for the second, and one for the last.
The value has a counting explanation: the empty set has exactly one ordering, the empty list. Equivalently, it has exactly one bijection to itself, the empty function. There are no choices to make, and one completed outcome. The factorial therefore obeys the recurrence relation
The useful distinction is how many positions are filled. For integers , choosing and ordering distinct objects by sampling without replacement gives the falling factorial, while choosing an unordered -element subset gives the binomial coefficient:
For five people, assigning captain and deputy gives outcomes; choosing a two-person team gives . Every team has exactly assignments of the two roles, explaining the division. When , both counts are one. The factorial is useful here because one count of full orderings yields both formulas by cancellation and by forgetting order. [ref]
Distinctness matters. If the two copies of in are indistinguishable, the visible arrangements are just , numbering . Temporarily labelling them gives six permutations, but exchanging the two labels leaves each visible word unchanged, so every word was counted times.
Proof outline. For , choose the first object in ways, then order the remaining objects in ways. The rule of product gives the recurrence relation; repeated application gives the displayed product, starting from the one empty ordering. This explains why the factorial grows quickly: every additional distinct object introduces another multiplicative factor.
Fundamental theorem of arithmetic Created 2026-09-24 Updated 2026-10-20
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.
Gaussian binomial coefficient Created 2026-10-13 Updated 2026-10-20
A Gaussian binomial coefficient refines an ordinary binomial coefficient into a polynomial that remembers a size statistic. For nonnegative integers and , write
The product represents a polynomial; it is not an instruction to divide by zero when or a denominator vanishes. The Gaussian binomial coefficient recurrence gives a way to compute it with only addition and multiplication. The empty product for is one, and as well. Setting after obtaining the polynomial recovers .
For example,
At this gives six objects, but its coefficients reveal how those six objects are distributed across sizes : there are two of size two and one of each other size. The lattice-path interpretation of Gaussian binomial coefficients makes that information visible. Take unit steps north or east from to . A north step at horizontal coordinate contributes shaded cells to its left. The six step words have total shaded areas .
Figure 1.
The six lattice paths counted by , weighted by the number of shaded cells
. Original exact enumeration of paths with two north and two east steps. Reading shaded row lengths from top to bottom gives a partition in a rectangle. Equal-sized diagrams contribute to the same coefficient. Details.
This is useful because an aggregate count can hide the feature one actually wants. A generating function retains the distribution of a statistic, so coefficient extraction answers questions such as “how many allowed diagrams contain exactly two cells?” The partition interpretation of Gaussian binomial coefficients makes every coefficient a nonnegative integer without relying on cancellation in the product formula.
An unexpected second use comes from linear algebra. If is a prime power, the value counts the -dimensional vector subspaces of . Thus the same expression that counts six paths at counts 35 two-dimensional subspaces of at . The Gaussian binomial coefficient counts finite-field subspaces article explains why selecting a vector subspace differs from selecting a subset of coordinates. [ref]
This relationship illustrates a q-analogue: the parameter can encode a statistic in one interpretation and the size of a finite field in another. Here denotes the formal variable, while denotes a finite field's cardinality when we evaluate the polynomial. The interpretation using a finite field requires to be a prime power; evaluating the polynomial at an arbitrary number does not construct a field of that size.
Möbius divisor-sum identity Created 2026-10-06 Updated 2026-10-14
For every positive integer , the divisor sum of the Möbius function is
The sum includes all positive integer divisors, but only squarefree divisors contribute. Equivalently, under Dirichlet convolution, where is the constant-one arithmetic function and is the Identity for Dirichlet convolution. [ref]
Each squarefree divisor chooses a subset of the distinct prime factors of , contributing when that subset has elements. Expanding a product therefore gives
For at least one prime factor occurs, so the product is zero. At it is an empty product, equal to one. This is the same alternating cancellation that drives inclusion-exclusion.
For , all eight positive integer divisors are squarefree integers, giving
Pair each subset not containing with the subset obtained by inserting : . Each pair cancels. The same nonzero terms occur for , because its squarefree divisors are still the integer divisors of ; its other integer divisors have Möbius function value zero.
Figure 1.
The eight integer divisors of 30 form a cube of subsets of its prime factors; adding one prime factor reverses the Möbius function sign, and all contributions cancel
. Details.
The Möbius divisor-sum identity is the cancellation behind Möbius inversion and reciprocal Dirichlet series: aggregation over integer divisors has an exact inverse.
Newton polynomial Created 2026-10-14 Updated 2026-10-18
The Newton polynomial expresses the interpolation polynomial in products that successively vanish at all previously used interpolation nodes. With , the coefficients are divided differences:
A triangular divided difference table computes all its coefficients using exactly divisions. The Newton polynomial and the Lagrange polynomial have the same polynomial degree bound and the same nodal values, hence are equal by uniqueness of polynomial interpolation.
For , , , the complete divided difference table is
The first divided differences are and , and their divided difference is . Reading the top entries gives
The initial term fits ; adding also fits ; adding fits while leaving the first two data values unchanged. This is the practical beauty of the Newton polynomial: each new correction respects all previous interpolation constraints.
If a new distinct interpolation node with value arrives, append one term:
For example, appending to the three-point data gives , hence . Changing the order of the interpolation nodes changes the Newton polynomial coefficients and products, but not the final interpolation polynomial in exact arithmetic.
The products also permit nested evaluation analogous to Horner's method. If , start with and work backwards by ; the answer is . The three-point example becomes , needing two multiplications for each evaluation. This organization is useful when adding observations incrementally or evaluating a stored Newton polynomial many times; the Runge phenomenon still depends on the interpolation nodes rather than on which representation is used.
To justify the update formula, its added product vanishes at every previous interpolation node. Choosing by the new residual forces agreement at , so uniqueness of polynomial interpolation identifies the result. For , has polynomial degree at most , and the added product has leading coefficient one. Thus the new coefficient is exactly . The initial state is , with the empty product interpreted as one.[ref]
Appending to the four-point example in divided difference table leaves the Newton polynomial unchanged: , so the new fourth divided difference is zero. If the appended value is instead , the new coefficient is
This polynomial still takes values at the original interpolation nodes, and now takes value at . A zero update is a valid completed step: adding another exact sample of the original polynomial need not increase the polynomial degree.
Split the factorial at , using :
By Wilson theorem, this is . Therefore . If the prime number is odd, then is even, so and
For , the signs and are identical modulo , and the two possibilities also give the same result. The empty product convention includes the endpoint cases. This is the complementary factorial congruence.
Euler's totient function counts the integers coprime to , equivalently the invertible residue classes modulo . Among , exactly the multiples of are not coprime to the prime power. Hence
Factor . Its distinct prime-power factors are pairwise coprime, so the permitted multiplicativity gives
For , the empty product is one and agrees with .
Use the measurable partition for , omitting any null cells. For , the random variable is bounded, so the law of total expectation applies without moment assumptions. Conditional on , the sum contains exactly terms. Independence of from the whole sequence preserves their joint law under this conditioning; independence of the then gives
For the empty sum is zero and the empty product is one, in agreement with the formula. Therefore the probability generating function of an independent random sum is
Every positive divisor has a unique prime factorization with . Conversely every such exponent choice gives a divisor. The exponent choices are independent, so the product rule gives
For the factorization is empty, and the empty product is one, corresponding to the divisor one.
Use strong induction on the positive integer . The case is represented by the empty product. For , if is prime it is already a product of one prime. Otherwise with ; the induction hypothesis gives prime factorizations for both and , and concatenating them gives one for . This proves existence in the fundamental theorem of arithmetic without presupposing uniqueness.
Radical of an integer Created 2026-10-06 Updated 2026-10-20
The radical of an integer is the product of its distinct prime factors, each included exactly once. If the prime factorization is with distinct prime numbers and positive integer exponents , then
Thus the radical of an integer remembers which prime factors occur and forgets their prime valuations. At , the empty product gives . The domain of a function here is the positive integers; zero is excluded. [ref]
For example, has distinct prime factors , so . Similarly,
using the prime factorizations , and . The prime omega function counts the retained prime factors, while the total number of prime factors counts their occurrences before repetitions are removed.
The radical of an integer is its largest squarefree divisor. Indeed, a squarefree divisor chooses at most one copy of each prime factor, so it divides ; the radical of an integer itself is a squarefree divisor. Consequently,
The last statement follows because every nonzero prime valuation is then one. It includes , a squarefree integer. Applying the radical of an integer twice also changes nothing: .
Figure 1.
The radical of an integer for : squarefree integers lie on the diagonal, and horizontal families share their prime support of an integer
. Details.
For any positive integers , the exact product rule is
To prove it, a prime factor dividing just one input occurs once in the numerator and not in the denominator. A prime factor dividing both occurs twice in the numerator and once in the denominator, since it divides their greatest common divisor. Each prime factor of therefore remains exactly once. For coprime integers, the denominator is , proving the radical of an integer is a multiplicative function. It is not a completely multiplicative function: .
For a worked example with shared prime factors, take and . Their greatest common divisor is , and , so
This explains why prime support of an integer is useful: questions about the presence of prime factors can discard their multiplicities. For example, the squarefree divisors of are exactly the integer divisors of , namely . Also if and only if , because coprimality depends only on shared prime factors.
A further characterization uses mutual divisibility of powers: for positive integers ,
If their prime supports of an integer agree, sufficiently large make all the required prime valuations large enough. Conversely, these two divisibility relations force each prime factor of either input to divide the other. For and , one can take and : and .
Square-free integer Created 2026-09-24 Updated 2026-10-20
A positive integer is square-free when no square number greater than one is a divisor of . It suffices to exclude squares of prime numbers; equivalently, every prime valuation is zero or one:
Thus the prime factorization of a square-free integer is a product of distinct prime factors, with no repetitions. One is included: its prime factorization is an empty product and all its prime valuations are zero. These equivalent tests are stated in Grinberg's notes. [ref]
For signed integers, extend the definition by requiring to be a square-free integer, where denotes absolute value. Hence and both qualify. Zero does not: every prime number has its square as a divisor of zero. The Möbius function and radical of an integer below use their existing positive integer domains, so apply them to when handling a negative integer.
For example, is a square-free integer, whereas is not, because and . Being a composite number causes no problem: are all square-free integers. A square-free integer need not be coprime to another integer: and are both square-free integers but have greatest common divisor two. In fact the only signed integers coprime to every integer are , since .
Figure 1.
Exact square-free integer classification of the integers from one to sixty
. Green cells are square-free integers; each red cell displays a prime number square that divides its label, choosing the smallest such prime number. Only need testing in this range. There are green cells. This original finite arithmetic diagram is an exact enumeration, not a measurement or an assertion about a limiting frequency. Details.
For positive integers , the useful product criterion is
The proof outline is just addition of prime valuations: can stay at most one only if neither input repeats a prime factor and no prime factor occurs in both. Thus is a square-free integer, but is not. An equivalent characterization is that every factorization into positive integers has coprime factors. If , the factorization supplies two factors sharing ; conversely, a shared prime factor forces its square to divide . For , the unordered factor pairs all have greatest common divisor one; for , the pair fails.
Two existing arithmetic functions turn the definition into practical tests:
The radical of an integer keeps one copy of each prime factor, so it changes precisely the integers with a repeated prime factor. Its definition is given in Evertse's exercise sheet. [ref] The Möbius function assigns to a square-free integer with distinct prime factors and zero otherwise; squaring forgets the sign. Consequently counts exactly the green cells. This connects a restriction on repeated prime factors with weighted counting and inclusion-exclusion. [ref]
Sum-of-divisors function Created 2026-10-03 Updated 2026-10-20
The sum-of-divisors function adds all positive integer divisors of a positive integer, including the number itself:
It is the divisor sum of the identity arithmetic function , so under Dirichlet convolution. Both factors are multiplicative functions, hence so is the sum-of-divisors function. The notation distinguishes it from other weighted divisor sums. [ref]
For a prime number and a nonnegative exponent , the positive integer divisors of the prime power are precisely . Their finite geometric series gives
For example, . For a prime factorization with distinct prime numbers and positive exponents , multiplicativity gives
For , this is an empty product, equal to . [ref]
The distributive property makes the formula especially beautiful: choosing one term from each factor produces each positive integer divisor exactly once, by the fundamental theorem of arithmetic. For , the choices form a three-by-two grid with entries , where and . Adding its rows gives
The divisor function counts six cells; the sum-of-divisors function adds their six values. Once the prime factorization is known, the product formula avoids testing every candidate integer divisor. Shared prime factors require care: , so the sum-of-divisors function is not a completely multiplicative function.
Figure 1.
The sum-of-divisors function for : each grid entry is a positive integer divisor, and the weighted total is
. Details.
Subtracting the number itself gives the proper-divisor sum . Comparing with distinguishes perfect numbers, deficient numbers, and abundant numbers. For , ; for , . Both are perfect numbers. The calculation makes a deficient number, while makes an abundant number. These comparisons turn the sizes of integer divisors into a classification of positive integers. [ref]
Figure 2.
The proper-divisor sum for : perfect numbers lie on , deficient numbers below it, and abundant numbers above it
. Details.
This connection is ancient: Euclid's Elements, Book IX, Proposition 36, constructs a perfect number by multiplying the last term of by their sum, when that sum is a prime number. In modern notation, put and , with and a prime number. The sum-of-divisors function proves the construction immediately:
Consequently the proper-divisor sum is . Taking produces the perfect numbers . [ref]