An integer is a whole number, positive, negative, or zero. The set of all integers isThe positive integers are ; the negative integers are their opposites . Zero is neither positive nor negative. The nonnegative integers include zero and all the positive integers. On a number line, consecutive integers are one unit apart, negative integers lie to the left of zero, and positive integers lie to its right. [ref]
3.1 Introduction to Integers. Prealgebra 2e, §3.1: Locate Positive and Negative Numbers on the Number Line; Opposite Notation; Integers
The integers let counting describe changes in both directions. If a counter starts at and increases by five, it reaches : . Decreasing that result by four gives . In addition on the number line, the sign of the added integer chooses the direction and its absolute value gives the distance. The additive inverse reverses the change made by .
The integers have closure under a binary operation for addition, subtraction and multiplication: whenever , the results , and are still integers. Together these operations give the integers their ring structure.[ref]
A Computational Introduction to Number Theory and Algebra by Victor Shoup. §7.1, p. 166, Definition 7.1; p. 167, Example 7.1: the integers with their usual addition and multiplication
For instance, , , and . General division has no such closure: is a rational number but not an integer. Some divisions are exact, such as ; division by zero is undefined. Euclidean division instead produces an integer quotient and a remainder, so retains the information that ordinary division puts into the fraction .An integer is the value, whereas its written numeral is an encoding. The decimal representation and the binary representation name the same integer. Changing positional notation changes how that value is displayed and how calculations are organized; it does not change the value itself.
A Hilbert number is a positive integer congruent to modulo . The Hilbert numbers form a multiplicative set: a product of two of them is again congruent to modulo .
In the multiplicative set of Hilbert numbers, a squarefree Hilbert number is one divisible by no square of a Hilbert number . This is weaker than being a squarefree integer: is a squarefree Hilbert number because its square divisor has outside the Hilbert numbers.
A cubefree integer is a positive integer divisible by no cube of a prime. Equivalently, every prime exponent in its prime factorization is at most two.
A repdigit is a positive integer whose base- expansion repeats one nonzero digit . For , and , the finite geometric series gives . For example, has decimal digits, all equal to five.
Every prime number not dividing divides infinitely many such repdigits. If it divides , every length works. Otherwise, if it does not divide , the Fermat little theorem gives divisibility for lengths that are multiples of , and division by is justified by its modular inverse. If , the sum is congruent to modulo , so lengths divisible by work instead. A prime dividing but not divides none, since . This distinction prevents invalid cancellation of the geometric-sum denominator.
A repdigit whose digits are all 1 in a specified positional notation of base . Its value is the geometric series . In base ten, appending one digit gives , so its remainder modulo can be computed by a recurrence relation without constructing the full integer.
For an integer and positive integer , Euclidean division writes with unique integer quotient and remainder . For , repeated quotient-and-remainder steps yield the digits of a base-p expansion when . The uniqueness follows because the difference of two permitted remainders cannot be a nonzero multiple of .
For an integer and positive integer , the remainder in Euclidean division is the unique integer in for which with an integer . It is not the full quotient .
Repeated division with remainder that determines successive digits of a quotient. To generate the fractional digits in base , multiply the current remainder by , divide by the denominator, and keep the resulting remainder for the next step.
For integers and , an integer division algorithm determines the binary numeral system digits of a quotient by testing and conditionally subtracting successively halved multiples of the divisor. The loop invariant , together with , makes each step a halving of the remaining quotient interval. Start with and large enough that . To decrease by one, subtract from and add to exactly when . Both branches preserve the displayed equality and establish . When , the quotient and remainder conditions hold.
A finite integer interval is a set with integers . Its length is . Infinite integer intervals can also be defined by allowing one or both endpoints to be infinite; a bounded-gaps condition on words always quantifies over finite integer intervals.
In positional notation, a numeral digit contributes its value multiplied by a weight determined by its position. Fix an integer radix . A finite string of numeral digits , with , represents the nonnegative integerThe rightmost position has weight ; each move left multiplies the weight by . This weight is the place value. For a nonzero integer, the canonical string has . Zero is written with the single numeral digit . Leading zeros are permitted in a fixed-width display but omitted in the canonical form: . A negative integer is written with a separate minus sign and the positional notation for its absolute value; the minus sign is not a numeral digit.[ref]
A Computational Introduction to Number Theory and Algebra by Victor Shoup. §3.3, pp. 55–56: base-B digit vectors, separate sign and nonzero highest digit
For example,The zero is essential inside this string: , not . It records that the tens position contributes nothing while keeping the hundreds and units in their proper positions. The same integer has binary representation
Repeated Euclidean division constructs the representation exactly. Set . At each step writeKeep the remainder and continue with the integer quotient . A positive quotient strictly decreases, so eventually it is zero. Substituting the successive equations back into the first gives : the numeral digits are obtained from right to left. The remainder modulo uniquely fixes , and then the quotient uniquely fixes the remaining string by the same reasoning. This proves existence and uniqueness once leading zeros are excluded. The needed unique quotient and remainder are precisely the conclusion of the Euclidean division theorem.[ref]
This finite expansion concerns nonnegative integers. Extending positional notation to fractional positions uses weights to the right of a point; an arbitrary real number need not have a finite digit string. In particular, the decimal representation represents , while the base-two string represents . The radix is part of the interpretation.
The benefit is compact arithmetic: positions can encode every nonnegative integer below . To see the upper endpoint, fill all positions with ; the finite geometric series gives . Carrying in addition exchanges units of one place value for one unit of the next. Thus a short string stores a large count and also supplies an algorithm for computing with it.
The digit sum of a nonnegative integer in a given base is the sum of its numerical digits. In base , replacing each power by shows that the integer and its digit sum are congruent modulo .
A positive integer whose sequence of numerical digits is neither weakly increasing nor weakly decreasing from left to right. Equivalently, one adjacent pair strictly rises and another strictly falls. Numbers in both monotone families have all digits equal, so their overlap consists of the repdigits.
A mixed-radix positional notation using factorials as place values: with . For lexicographic order on permutations, division by selects the next symbol when symbols remain; the remainder gives the rank within that block.
A nonnegative integer whose positional notation reads the same forwards and backwards, with no leading zeros. This property depends on the base: is a palindromic number in both decimal representation and binary representation, since .
A palindromic number in binary representation, with no leading zeros. Every positive binary palindrome is an odd number, because its first and last numerical digits must both be one.
A positive integer whose repeated reverse-and-add process never reaches a palindromic number in the chosen base. Each step adds the current number to the number obtained by reversing its numerical digits. Failure to find a palindromic number after a fixed iteration limit establishes only a candidate, not a proof that the process never succeeds.
A numerical digit is one symbol in a positional notation string, denoting an integer from zero through one less than the radix.
A positive integer whose first decimal numerical digits have the same sum as its last digits, where is the number of digits. For odd , the shared middle digit cancels from the equality. Counts and value sums can therefore be assembled from two half-length digit dynamic programming tables indexed by base-p digit sum.
A positive integer whose adjacent decimal numerical digits differ by exactly 1. Its digits form a walk on the path graph , with a nonzero starting digit. Counting pandigital numbers of this type can use digit dynamic programming with the final digit and a bit mask of visited digits as the state.
Repeatedly sum the numerical digits of a nonnegative integer in base until a single numerical digit remains. For , the result is , while the result for zero is zero. This follows because , so summing numerical digits preserves the integer congruence class modulo .
A number whose representation contains every numerical digit from a specified alphabet. The convention must specify the base, whether zero is required, and whether repetitions are allowed. In many counting problems, “0-to-9 pandigital” means that all ten decimal numerical digits occur exactly once; other problems require only that each occur at least once.
The radix is the base of positional notation. In the ordinary integer-base case it is an integer , and successive place values differ by a factor of .
A positional representation in which each digit has its own positive integer base. Least-significant-first digits satisfy , and digit has weight . For positions, assume . Repeated Euclidean division by the successive bases converts that integer to digits; a backwards version of Horner's method converts the digits back.
The place value is the weight of a position in positional notation. A numeral digit at that position contributes to the represented number.
A nonnegative integer's decimal expansion uses digits . Testing divisibility reduces this polynomial in ten modulo the divisor: for example makes divisibility by eleven equivalent to vanishing of the alternating digit sum.
A hereditary base representation expands not only the number in base , but also every exponent recursively in that same base. Changing the base at every depth defines the Goodstein base-change operation; replacing it by omega defines an ordinal rank of a Goodstein term.
Start at base two. At each nonzero step, change every base occurrence in the hereditary base representation to the next base and subtract one. Although the natural-number terms can grow, their ordinal ranks of a Goodstein term decrease strictly. Keep zero fixed once it is reached.
Every Goodstein sequence reaches zero. Before zero, the ordinal rank of a Goodstein term of each step is strictly smaller than the preceding one. An infinite sequence would contradict well-foundedness of the ordinals below epsilon zero.
Replacing every base occurrence by omega in a hereditary base representation gives a Cantor normal form below epsilon zero. Hereditary base change preserves this ordinal expression, and subtraction of one lowers it strictly. The ordinal is a termination measure even when the natural-number value increases.
The Goodstein function records the least step at which the Goodstein sequence from a given initial number reaches zero. With the initial step numbered zero, its values on are . Goodstein's theorem makes this effective termination-time function total.
For an integer base , a nonnegative integer has a finite positional representation with digits . Repeated Euclidean division gives the digits uniquely; appending zero high-place digits has no effect. The base need not be prime for uniqueness, but a prime base is useful in Lucas theorem and modular binomial coefficients.
The binary numeral system is positional notation with radix two. Each binary digit is zero or one, and its place value is a power of two. A one includes that weight in the sum; a zero skips it. The binary representation therefore selects and represents the integer .
To obtain those binary digits from , repeatedly use Euclidean division by two:The remainders, in the order produced, are . Read them in reverse order to get . The final zero is the quotient that stops the conversion, not an additional leading binary digit. Starting with zero itself needs the special single-digit representation .
A useful independent check reads the binary digits from left to right. Start with and, for each binary digit , replace by . For , the intermediate values are . This reconstructs the integer without reversing a list and explains why appending a zero on the right doubles the value.
Binary is well suited to computation because each binary digit has just two possibilities. A stored bit can encode either possibility; groups of bits encode larger integers. Practical integer arithmetic can use a radix that is itself a power of two, grouping several binary digits into each stored numeral digit.[ref]
A Computational Introduction to Number Theory and Algebra by Victor Shoup. §3.3, p. 56: choice of a power-of-two base for stored integer digits
A displayed negative integer, such as , uses a separate sign. A computer's particular signed storage convention is an additional encoding choice, so the displayed sign should not be confused with an extra binary place.A binary digit is a zero or one in the base-two positional representation of an integer. The sum determines the Thue–Morse sequence and is the Hamming weight of the binary representation.
A decimal representation is positional notation with radix ten and numeral digits zero through nine. For an integer, the nonnegative part is a finite decimal expansion; a negative integer has a separate minus sign. For example, , whereas . The numeral digits alone do not determine the value: their positions do.
Fractional positions extend the same place value rule to the right of the decimal point, with successive weights . [ref]
5.1 Decimals. Prealgebra 2e, §5.1, Name Decimals, Tables 5.1–5.2 and Figure 5.2: whole-number and fractional place values
For example,The matching binary representation is , since its fractional part is . These representations terminate in both bases; finiteness in one radix does not imply finiteness in another.Leading zeros in the integer part and trailing zeros in the fractional part leave the value unchanged: . A zero appended to the right of an integer string has a different effect: . Keeping the decimal point fixed prevents confusing these two operations.
Every integer has a finite decimal expansion, but a noninteger rational number may need infinitely many fractional numeral digits, as in . A terminating decimal has a zero tail by convention. Infinite decimal strings have a further ambiguity that finite canonical integer strings do not: , because the geometric series sums to one. An infinite decimal tail denotes a limit, not a sufficiently long rounded approximation.
A decimal representation with only finitely many nonzero fractional digits. A reduced fraction has this property exactly when its denominator has no prime factors other than two and five. The zero tail is distinguished from the genuine repeating block measured by decimal period from multiplicative order.
A positive integer with nonzero integers satisfying . Equivalently, . A useful parametrization is for positive integers with , coming from the signed triple .
A number for distinct prime numbers . The ordering of the two primes matters because their exponents differ. Unique prime factorization identifies the ordered pair from the resulting integer.
A positive integer whose sum with its digit reversal has only odd numerical digits, with leading zeros forbidden in both the original and reversed representations. For example, . Studying the arithmetic carries of mirrored digit pairs allows whole lengths to be counted without enumerating all integers of that length.
A positive integer for which some division with integers and has as consecutive terms of a geometric progression in some order. Writing a reduced common ratio as with and , the three terms have the form for a positive integer .
In this positive integer context, a power of two is for a nonnegative integer , giving . Allowing negative or real exponents gives a broader meaning of exponentiation, which is not intended in the integer divisibility criteria here.
A Mersenne number has the form for a positive integer . Its binary representation consists of ones. For example, is composite, while is prime. If with , the finite geometric series factorizationhas two factors greater than one. Consequently a Mersenne prime requires a prime exponent, but shows that this condition alone is insufficient.
A Mersenne prime is a Mersenne number that is a prime number. It is the prime factor required by the Euclid-Euler theorem; generate . The family is named after Marin Mersenne.
A perfect number is a positive integer equal to the sum of all its positive proper divisors. The divisor itself is excluded: including it gives the equivalent condition for the sum-of-divisors function. The smallest examples are and .
For comparison, has proper divisors , whose sum is : it is a deficient number. The proper divisors of are , whose sum is : it is an abundant number. The proper-divisor sum classifies these examples with the same rule, and gives , so one is not a perfect number.
Proper divisors balance a perfect number, fall short of a deficient number, or exceed an abundant number
. Original exact proper-divisor sums for . Each bar is normalized by its candidate number, and its segments are labelled with the actual proper divisors. The dashed line at one marks equality with the candidate. These are finite arithmetic calculations, not empirical data. Details.The interesting question is how such balances can be constructed without testing every smaller integer as a possible divisor. The Euclid-Euler theorem answers it for even integers: a Mersenne prime gives , and every even perfect number arises this way. For , this produces . The connection links divisor sums to primality testing for a particular family, while keeping the necessary hypotheses visible.[ref]
Euclid's Elements already gives the construction in Book IX, Proposition 36: add a succession of powers of two, and if their sum is prime, multiply by the final power of two. The modern finite geometric series makes the same pattern transparent. This original statement supplies the forward construction, rather than the converse classification of all even perfect numbers.[ref]
An even integer is a perfect number if and only ifThis forces to be a prime number, as shown under Mersenne number. It does not say that every prime exponent works, nor classify possible odd integers.[ref]
Perfect numbers and Mersenne primes by Keith Conrad. Theorem 1.1, pp. 1–2: even-number equivalence and proof
For the forward direction, put and use coprimality of and . Multiplicativity of the sum-of-divisors function and the finite geometric series giveThe prime number hypothesis makes ; replacing it with a composite number changes this factor.
For a short converse outline, write with and an odd integer. The condition givesHere is a positive integer and a proper divisor of . If , the distinct divisors alone exceed the required sum . Thus and , forcing to be prime and .
The prime exponents give Mersenne primes and therefore perfect numbers. But gives . The resulting candidate hasso . It is an abundant number, not a perfect number. Checking only that the exponent is prime would miss this obstruction.
A positive integer whose proper-divisor sum is smaller than itself; equivalently, its sum-of-divisors function satisfies . For example, ; also .
A positive integer whose proper-divisor sum exceeds itself; equivalently, its sum-of-divisors function satisfies . For example, .
Two integers have opposite parity when one is an even number and the other is an odd number. Their sum is then an odd number.
An odd integer is not divisible by two; equivalently, it has the form .
An integer is even when it is divisible by two.
An integer is odd when it is not divisible by two.
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]
https://darijgrinberg.gitlab.io/floor.pdf. Darij Grinberg, MIT 18.781, Floor and arithmetic functions, Definition 2.1.2 and footnote 6
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 .
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 isThe 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]
https://pub.math.leidenuniv.nl/~evertsejh/dio12-ex4.pdf. Jan-Hendrik Evertse, Diophantine approximation, Homework IV, Exercise 20
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]https://darijgrinberg.gitlab.io/floor.pdf. Darij Grinberg, MIT 18.781, Definition 2.1.2: the Möbius function
The squarefree part of a positive integer is the unique squarefree integer such that for a positive integer . For example, the squarefree part of is . It retains precisely the primes with odd prime exponents; the radical of an integer instead retains every distinct prime factor.
The squarefree counting function is . The Möbius function gives , because is the indicator of a square-free integer.
A positive integer is squarefull when every prime dividing it also divides it to at least the second power. Thus is not squarefull as soon as some prime satisfies but .
Every positive integer has a unique factorization with powerful, squarefree, and : assign each prime power of exponent at least two to , and each prime of exponent one to . In general differs from the squarefree part, which instead retains every prime of odd exponent.
A powerful number that is not a perfect power. If is its prime factorization, the conditions are for every and .
A square number is an integer of the form for some integer . Consecutive nonnegative squares differ by .
The square part of a positive integer is its largest square divisor, . Dividing by its square part leaves the squarefree part.
For a nonnegative integer , compute its integer square root and accept exactly when . An approximate square root must be corrected with exact integer comparisons before this equality is tested. This procedure distinguishes a squareness test from merely approximating a square root.
Articles by others on the same topic
An integer is a whole number that can be positive, negative, or zero. Integers do not include fractions, decimals, or any non-whole numeric values. The set of integers is typically represented by the symbol **ℤ** and includes numbers such as: - Positive integers: 1, 2, 3, ... - Zero: 0 - Negative integers: -1, -2, -3, ...




