Additive function (number theory) 2026-10-13
An arithmetic function is additive when for coprime integers . Equivalently, . This concerns multiplication of integers, and differs from an additive function on a vector space.
If are nonzero integers, , and is one solution of the linear Diophantine equation , then all solutions areSubtract two solutions and use the fact that and are coprime integers. The linear Diophantine equation solvability criterion says that a particular solution exists exactly when divides ; the extended Euclidean algorithm constructs one. This parametrization separates existence from the complete family of answers.
Coprime integers Created 2026-09-24 Updated 2026-10-14
Two integers are coprime when their greatest common divisor is one:For positive integers, this says that the only positive common divisor is one. For signed integers, use , with absolute values; changing either sign leaves coprimality unchanged. With the convention , zero is coprime precisely to , because . Both are coprime to every integer. [ref]
https://darijgrinberg.gitlab.io/floor.pdf. Darij Grinberg, MIT 18.781, Section 1.2: greatest common divisors and coprimality
The word concerns shared prime factors, not whether either input is a prime number. For instance and are coprime composite numbers, even though neither is a square-free integer. Conversely, and are square-free integers but are not coprime. Consecutive integers are always coprime: any common divisor of divides their difference one. Thus provide another pair of coprime composite numbers.
For positive integers, let be the prime support of an integer. The equivalent test isThe set intersection of the two prime supports of an integer must be the empty set. Indeed, any positive common divisor greater than one has a prime factor, and any shared prime factor is a common divisor greater than one. Hence coprimality depends on which prime factors occur, rather than on their prime valuations; replacing either input by its radical of an integer preserves coprimality.
For a list of at least two integers, distinguish pairwise coprimality, requiring every pair to be coprime, from joint coprimality, requiring only the greatest common divisor of the entire list to be one. For example,No prime factor belongs to all three prime supports of an integer, yet each pair shares one. By contrast, have pairwise coprimality. The distinction is presented by Poritz under the names pairwise and mutually relatively prime. [ref]
https://math.libretexts.org/Bookshelves/Combinatorics_and_Discrete_Mathematics/Yet_Another_Introductory_Number_Theory_Textbook_-_Cryptology_Emphasis_(Poritz)/01:_Well-Ordering_and_Division/1.05:_The_Greatest_Common_Divisor. Jonathan A. Poritz, Yet Another Introductory Number Theory Textbook, Section 1.5
One use is simplifying fractions. For a fraction with integer entries and , divide its numerator and denominator by to obtain a reduced fraction with coprime entries. For example, since , and uses the same . A further common divisor would make too small, so the reduction is complete. In particular, the reduced fraction for zero is .
Another use is reversible modular arithmetic: for an integer modulus , an integer has a modular inverse precisely when are coprime. The proof outline uses Bézout's identity: makes a modular inverse, and any inverse relation forces every common divisor to divide one. For example, gives , whereas has no modular inverse modulo . Thus coprimality is the exact condition allowing division by a residue in modular arithmetic. [ref]
https://ocw.mit.edu/courses/18-200-principles-of-discrete-applied-mathematics-spring-2024/mit18_200_s24_lec15.pdf. Ankur Moitra, MIT 18.200, Lecture 15, Lemmas 1–2 and modular inverses
Decimal period from multiplicative order 2026-10-14
For a reduced fraction with , , and coprime integers, its decimal representation repeats immediately after the decimal point. The shortest repeating block has lengthHere denotes multiplicative order, and denotes Euler's totient function. Changing the numerator preserves the decimal period as long as the fraction remains reduced.[ref]
For example, long division of gives the remainders , with emitted digits . ConsequentlyEach remainder determines both the next digit and the next remainder; returning to one restarts the same six steps.
Long-division remainders explain the six-digit repeat of one seventh and the two-digit prefix of one twenty-eighth
. Details. More generally, initialize long division with . At each step, division with remainder givesso . Since are coprime integers, the modular inverse of shows that exactly when . To see why the digit block cannot repeat sooner than the remainders, a purely repeating decimal with a block of digits represents for an integer . A reduced fraction with that value forces . Hence the shortest digit repeat and the multiplicative order coincide.
Knowing the decimal period predicts how many digits must be computed and stored: one block determines the whole repeating decimal. It also constructs the block directly. With , the integeris the block, padded on the left with zeros to digits. For , and , so the block is and . Reduction matters: has decimal period one, whereas .
If the reduced denominator contains prime factors two or five, ten has no multiplicative order modulo that whole denominator. WriteThe decimal preperiod has exactly digits. If , the remaining repeating decimal has decimal period . For instance, gives : two prefix digits, then six repeating digits. If , the decimal representation is a terminating decimal with exactly fractional places. We use the representation ending in zeros, rather than its alternative ending in nines; for example terminates after three places.
A short derivation explains both cases. After digits, multiplying the reduced fraction by and discarding its integer part leaves a reduced fraction whose denominator is . This denominator first becomes coprime to ten at . It then equals , giving an immediate repeat when , or an integer when . The same long division argument works for positional notation in any base : for a reduced denominator coprime to , the shortest repeating block has length .
Divisor function Created 2026-09-24 Updated 2026-10-20
The divisor function counts the positive integer divisors of a positive integer . In particular , because has just one positive integer divisor. More generally the notation gives and the sum-of-divisors function . Thus the divisor function counts the positive integer divisors, while adds their sizes. [ref]
https://darijgrinberg.gitlab.io/floor.pdf. Darij Grinberg, MIT 18.781 lecture notes, Definition 2.1.2 and Theorem 2.1.6
If the prime factorization is with distinct prime numbers and positive exponents , thenThe short proof is a count: each positive integer divisor has a unique form , where . There are choices at each prime number, and choosing them gives every positive integer divisor exactly once. For there are no prime factors and the product is .
For , choose and to obtain . The six values are ; sorted, the positive integer divisors are . Therefore . The diagram makes the independent exponent choices visible.
The prime factorization gives a three-by-two array of positive integer divisors , so the divisor function has
. Details. This count is useful because a known prime factorization gives without testing every smaller positive integer for divisibility. It also proves the divisor function is a multiplicative function: coprime integers have disjoint prime factors, so their exponent choices combine. For example , but , so it is not a completely multiplicative function. Equivalently, under Dirichlet convolution, counting ordered pairs of positive integers whose product is .
Divisor sum Created 2026-09-24 Updated 2026-10-14
The divisor sum of an arithmetic function assigns to each positive integer the sumOnly positive integer divisors are included, so . The weights can count the integer divisors, measure their sizes, or record other arithmetic information: the constant-one arithmetic function gives the divisor function, whereas the identity arithmetic function gives the sum-of-divisors function.
Equivalently, , where is Dirichlet convolution and is the constant-one arithmetic function. If is a multiplicative function, then is a multiplicative function by Multiplicativity of Dirichlet convolution. [ref]
https://darijgrinberg.gitlab.io/floor.pdf. Darij Grinberg, MIT 18.781 notes on floor and arithmetic functions, Proposition 2.4.2 and Theorem 2.6.1
Here is the mechanism. For positive coprime integers , every positive integer divisor of has a unique form with and ; moreover, are coprime integers. Thus a multiplicative function satisfiesAt a prime power, the divisor sum becomes . This turns a calculation over many integer divisors into short local calculations at prime powers.
Euler totient function Created 2026-09-24 Updated 2026-10-20
Euler's totient function is the arithmetic functionIt 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]
https://darijgrinberg.gitlab.io/floor.pdf. Darij Grinberg, MIT 18.781 lecture notes, Definition 2.1.2
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 formulawhere 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 .
Extended Euclidean algorithm Created 2026-09-29 Updated 2026-10-20
The extended Euclidean algorithm also computes integers satisfying , as in Bézout's identity. Back-substitution in the calculation under the Euclidean algorithm givesThus solves . The linear Diophantine equation is solvable exactly when divides : necessity follows from common divisibility, and multiplying this identity proves sufficiency. For coprime integers , the coefficient of is a modular inverse of modulo , and the coefficient of is a modular inverse of modulo , when the respective modulus is greater than one.
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.
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]
Observations on a certain theorem of Fermat and on others concerning prime numbers by Leonhard Euler. pp. 1–2 and the publication note
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.
Möbius function Created 2026-09-24 Updated 2026-10-13
The Möbius function assigns a cancellation weight to each positive integer:Thus a squarefree integer contributes a sign determined by its number of distinct prime factors; a repeated prime factor makes the weight zero. This packages the alternating signs of inclusion-exclusion into an arithmetic function. [ref]
https://darijgrinberg.gitlab.io/floor.pdf. Darij Grinberg, MIT 18.781 lecture notes, Definition 2.1.2
For example, , , and , since . In contrast, : all three have the square of the prime number as a divisor. On prime powers, and for .
The Möbius function is a multiplicative function: for coprime integers, their prime factors are disjoint, so either a squared prime factor forces both sides of to vanish, or the counts of distinct prime factors add and their signs multiply. It is not a completely multiplicative function, since . Its Möbius divisor-sum identity makes it the inverse of the constant-one arithmetic function under Dirichlet convolution: , the Identity for Dirichlet convolution. This is why the small set of weights can undo an entire divisor sum.
Möbius inversion formula Created 2026-09-24 Updated 2026-10-14
Möbius inversion recovers an arithmetic function from its divisor sum. For arithmetic functions , the following statements are equivalent, with each equality required for every positive integer :Here ranges over positive integer divisors of and is the Möbius function. No multiplicativity assumption is needed, and both sums are finite. The right side can also be written by exchanging complementary integer divisors. [ref]
https://darijgrinberg.gitlab.io/floor.pdf. Darij Grinberg, MIT 18.781 lecture notes, Theorem 2.5.1 and Proposition 2.5.2
The divisor sum bundles together with values at smaller integer divisors. Möbius inversion subtracts aggregates indexed by one distinct prime factor, adds those indexed by two, and continues with the alternating signs of inclusion-exclusion. A divisor containing a squared prime factor receives weight zero. The Möbius divisor-sum identity ensures that every unwanted contribution cancels exactly.
In Dirichlet convolution notation, and , where is the constant-one arithmetic function and is the Identity for Dirichlet convolution. Associativity and commutativity give the short proof:Convolving with proves the reverse implication. At , the formula reduces to because .
For a worked example, take , Euler's totient function. The totient divisor-sum identity says that , the identity arithmetic function:This identity comes from classifying the integers by their greatest common divisor with : the group with has members, since and are coprime integers. Summing the group sizes gives , as detailed under totient divisor-sum identity.
Now undo this aggregation with the Möbius function:The nonzero terms use ; vanish because they contain the square of the prime number . The four surviving integers coprime to are .
A divisor sum aggregates Euler's totient function values to 12, while Möbius inversion recovers the four integers coprime to 12
. Details. This example also reveals why Möbius inversion is useful: it turns an easy count of all objects into a count satisfying a coprimality restriction. Expanding over subsets of distinct prime factors givesThe product is inclusion-exclusion over multiples of the prime factors. For , it gives . More generally, whenever a counting problem produces a divisor sum, Möbius inversion lets that aggregate be reversed without solving a new system of equations.
Modular multiplicative inverse Created 2026-09-24 Updated 2026-10-13
For integers and , a modular multiplicative inverse is a congruence class satisfying . It exists exactly when . Necessity follows because every common divisor of would divide . Conversely, Bézout's identity gives for coprime integers, making an inverse. This is the basic bridge from greatest common divisor calculations to reversible modular arithmetic.
For example, , so . The modular congruence therefore has the unique solution class . Multiplication by sends all seventeen residue classes to different classes; multiplying by reverses it. The inverse criterion and its algorithmic construction are presented in Ankur Moitra, MIT 18.200, 2024, modular inverses and Euclid's algorithm.
By contrast, has no modular inverse modulo . Its products have only residues . Consequently has no solution, while has five solution classes, . Dividing by a noninvertible residue would discard this distinction. In a prime field , every nonzero residue is invertible; a general integer modulus instead gives a quotient ring that can have zero divisors.
For with and , the square class in a two-isogeny descent would require coprime integers and an integer with . If is odd and even, the right side is modulo ; if is even and odd, it is ; if both are odd, it is . None is a square modulo . Therefore does not occur in the two-torsion square-class homomorphism image.
Multiplicative function Created 2026-10-13 Updated 2026-10-20
An arithmetic function is a multiplicative function when and for all coprime integers , meaning their greatest common divisor is . The condition excludes the identically zero function. This definition makes no assertion about a pair whose greatest common divisor exceeds . [ref]
https://darijgrinberg.gitlab.io/floor.pdf. Darij Grinberg, MIT 18.781 lecture notes, Definition 2.2.1
For the divisor function, the integer divisors of are , those of are , and those of are . HenceHere and are coprime integers. In contrast, , because the integer divisors of are . Thus the divisor function is a multiplicative function but not a completely multiplicative function.
The practical gain is that prime factorization reduces all values to values at prime powers. For distinct prime numbers and positive exponents ,For instance, since and are coprime integers; replacing by additionally requires a completely multiplicative function. The short proof repeatedly applies the defining rule to prime powers belonging to different prime numbers, which are coprime integers.
Multiplicative order Created 2026-09-24 Updated 2026-10-13
For coprime integers with , the multiplicative order is the least positive integer such thatIt counts the distinct powers in the cyclic subgroup generated by the congruence class of . Thus it is an order of a group element in the unit group .[ref]
A Computational Introduction to Number Theory and Algebra by Victor Shoup. pp. 153 and 156–157, Theorem 6.29
For example, the modular exponentiation , starting at , produces . The first return to one takes three steps, so . Starting at the congruence class three and repeatedly multiplying by two instead gives : these are the other three units modulo seven, outside the cyclic subgroup generated by two.
Euler's theorem guarantees a return to one at exponent , where is Euler's totient function. Thus the multiplicative order exists for every unit.[ref]
Euler’s Theorem by Keith Conrad. p. 1, Theorem 1.2; pp. 2–3, permutation of the units and cancellation
In fact,By Lagrange's theorem, the size of the cyclic subgroup divides the size of the unit group, which is Euler's totient function. For two modulo seven, this is ; the multiplicative order need not equal Euler's totient function. If , its multiplicative order is one.The coprime integers hypothesis is necessary: if , any common divisor of and divides one. For instance, powers of two modulo eight give , with no positive-exponent return to one. This sequence eventually settles, but two has no multiplicative order modulo eight.
Multiplicativity of an arithmetic function Created 2026-10-06 Updated 2026-10-14
For an arithmetic function, multiplicativity means and whenever are positive coprime integers. It allows values of an arithmetic function to be assembled from its values on prime powers, as explained under multiplicative function.
Multiplicativity of Dirichlet convolution 2026-10-14
The Dirichlet convolution of two multiplicative functions is a multiplicative function. For positive coprime integers , every positive integer divisor of has a unique form with and , by prime factorization. The pairs and are each coprime integers, so the defining rules for the two multiplicative functions separate the sum:Also . This short argument proves multiplicativity of both the divisor function and the sum-of-divisors function . The result need not be a completely multiplicative function, even when both inputs are: fails at . [ref]
Number theory Created 2026-09-24 Updated 2026-10-13
Number theory studies integers, their divisibility, and the patterns created by prime numbers. Its questions often have short statements but rigid answers: which integers divide a given one, when does an equation have integer solutions, and when can arithmetic with congruence classes be reversed? The Euclidean algorithm and modular multiplicative inverses connect these questions through explicit calculations.
For example, and . Their shared prime factors give greatest common divisor . The Euclidean algorithm reaches that answer without finding either complete prime factorization. It also produces , an instance of Bézout's identity. This relation certifies every common divisor at once and solves an associated linear Diophantine equation.
Modular arithmetic retains only remainders, but the lost information can be surprisingly controlled. Multiplication by modulo is a permutation of all residue classes, because has modular inverse . Multiplication by modulo collapses fifteen residue classes to three. Thus an apparently small change in the modulus changes whether a calculation can be reversed. The Chinese remainder theorem explains another kind of compression: remainders modulo coprime integers can be combined into one remainder modulo their product.
Simple restrictions help reveal the structure without telling the whole story. Every prime number greater than three is congruent to or modulo : the other four residue classes force divisibility by or . The converse fails because and lie in those classes but are composite numbers. Necessary conditions are useful filters, not substitutes for primality testing.
The subject's appeal lies partly in this tension: prime factorization gives a clean description of every positive integer, while identifying factors and predicting their distribution lead to substantial further questions. Analytic number theory uses tools from analysis to study global patterns, and algebraic number theory extends arithmetic into number fields. Applications include cryptography and error-correcting codes; MIT's discrete applied mathematics course develops modular structures for both purposes. [ref]
https://ocw.mit.edu/courses/18-200-principles-of-discrete-applied-mathematics-spring-2024/mit18_200_s24_lec15.pdf. Ankur Moitra, MIT 18.200, Modular Arithmetic and Elementary Algebra, 2024, introduction
Euclid's Elements already gives a greatest-common-measure construction in Book VII, Proposition 2, and the argument that a finite list cannot exhaust the prime numbers in Book IX, Proposition 20. These are documented ancient treatments, rather than evidence that all of number theory began with one author. [ref]
https://mathcs.clarku.edu/~djoyce/java/elements/bookVII/propVII2.html. Euclid, Elements VII.2, translated text hosted by David Joyce
[ref]https://mathcs.clarku.edu/~djoyce/java/elements/bookIX/propIX20.html. Euclid, Elements IX.20, translated text hosted by David Joyce
Order as the exact period of modular exponentiation Created 2026-09-24 Updated 2026-10-14
Let be coprime integers with , and let be their multiplicative order. For integers ,Negative exponents mean powers of the modular inverse of . Thus periodic modular exponentiation has smallest positive period , and are distinct congruence classes.[ref]
A Computational Introduction to Number Theory and Algebra by Victor Shoup. pp. 156–157, Theorem 6.29; multiplicative notation on p. 153
This lets a huge modular exponentiation reuse a short list: reduce its exponent modulo the multiplicative order, then look up the corresponding power. For example, gives , while gives . When the multiplicative order is unknown, Euler's theorem permits reduction modulo Euler's totient function, though that period may be longer. Repeated squaring remains useful when computing either the unreduced or the reduced power.
For a proof outline, multiply by the modular inverse of , leaving . Apply Euclidean division to write with . Then ; minimality of the multiplicative order forces . The reverse implication follows from . The coprime integers hypothesis enables cancellation: modulo eight, , but this repetition supplies no multiplicative order for two.
Take , and . Since are coprime integers, Bézout's identity gives , so . Their intersection is : it consists of integers divisible by both and , and coprimality makes this equivalent to divisibility by . Thus the Chinese remainder theorem givesas a ring isomorphism. This includes or , where the corresponding factor is the zero ring.






