 # Arithmetic

## Arithmetic Topics

Sort by:

### Plaindrome

A plaindrome is a number whose hexadecimal digits are in nondecreasing order. The first few are 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 17, 18, 19, 20, 21, 22, 23, 24, ... (OEIS A023757).A number that is not a plaindrome is called a katadrome.The following table summarizes related classes of numbers.namebase-16 digit orderkatadromestrict descendingmetadromestrict ascendingnialpdromenonincreasingplaindromenondecreasing

### Decimal expansion

The decimal expansion of a number is its representation in base-10 (i.e., in the decimal system). In this system, each "decimal place" consists of a digit 0-9 arranged such that each digit is multiplied by a power of 10, decreasing from left to right, and with a decimal place indicating the s place. For example, the number with decimal expansion 1234.56 is defined as(1)(2)Expressions written in this form (where negative are allowed as exemplified above but usually not considered in elementary education contexts) are said to be in expanded notation.Other examples include the decimal expansion of given by 625, of given by 3.14159..., and of given by 0.1111.... The decimal expansion of a number can be found in the Wolfram Language using the command RealDigits[n], or equivalently, RealDigits[n, 10].The decimal expansion of a number may terminate (in which case the number is called a regular number or finite decimal, e.g., ), eventually..

### Octal

The base 8 notational system for representing real numbers. The digits used are 0, 1, 2, 3, 4, 5, 6, and 7, so that (8 in base 10) is represented as () in base 8. The following table gives the octal equivalents of the first few decimal numbers.11111321252212142226331315232744141624305515172531661620263277172127338101822283491119232935101220243036The song "New Math" by Tom Lehrer (That Was the Year That Was, 1965) explains how to compute in octal. (The answer is .)

### Number length

The length of a number in base is the number of digits in the base- numeral for , given by the formulawhere is the floor function.The multiplicative persistence of an -digit is sometimes also called its length.

### Binary

The base 2 method of counting in which only the digits 0 and 1 are used. In this base, the number 1011 equals . This base is used in computers, since all numbers can be simply represented as a string of electrically pulsed ons and offs. In computer parlance, one binary digit is called a bit, two digits are called a crumb, four digits are called a nibble, and eight digits are called a byte.An integer may be represented in binary in the Wolfram Language using the command BaseForm[n, 2], and the first digits of a real number may be obtained in binary using RealDigits[x, 2, d]. Finally, a list of binary digits can be converted to a decimal rational number or integer using FromDigits[l, 2].The illustration above shows the binary numbers from 0 to 63 represented graphically (Wolfram 2002, p. 117), and the following table gives the binary equivalents of the first few decimal numbers.1111101121101012101211002210110311131101231011141001411102411000510115111125110016110161000026110107111171000127110118100018100102811100910011910011291110110101020101003011110A..

### Nialpdrome

A nialpdrome is a number whose hexadecimal digits are in nonincreasing order. The first few are 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 32, 33, 34, 48, 49, 50, ... (OEIS A023771), corresponding to 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F, 10, 11, 20, 21, 22, 30, 31, 32, ....A number that is not a nialpdrome is a metadrome.The following table summarized related classes of numbers.namebase-16 digit orderkatadromestrict descendingmetadromestrict ascendingnialpdromenonincreasingplaindromenondecreasing

### Karatsuba multiplication

It is possible to perform multiplication of large numbers in (many) fewer operations than the usual brute-force technique of "long multiplication." As discovered by Karatsuba (Karatsuba and Ofman 1962), multiplication of two -digit numbers can be done with a bit complexity of less than using identities of the form(1)Proceeding recursively then gives bit complexity , where (Borwein et al. 1989). The best known bound is steps for (Schönhage and Strassen 1971, Knuth 1998). However, this algorithm is difficult to implement, but a procedure based on the fast Fourier transform is straightforward to implement and gives bit complexity (Brigham 1974, Borodin and Munro 1975, Borwein et al. 1989, Knuth 1998).As a concrete example, consider multiplication of two numbers each just two "digits" long in base ,(2)(3)then their product is(4)(5)(6)Instead of evaluating products of individual digits, now write(7)(8)(9)The..

### Trial division

A brute-force method of finding a divisor of an integer by simply plugging in one or a set of integers and seeing if they divide . Repeated application of trial division to obtain the complete prime factorization of a number is called direct search factorization. An individual integer being tested is called a trial divisor.

### Integer division

Integer division is division in which the fractional part (remainder) is discarded is called integer division and is sometimes denoted . Integer division can be defined as , where "/" denotes normal division and is the floor function. For example,soInteger division is implemented in the Wolfram Language as Quotient[a, b].

### Times

The operation of multiplication, i.e., times . Various notations are , , , , and . The "multiplication sign" is based on Saint Andrew's cross (Bergamini 1969). Floating-point multiplication is sometimes denoted .

### Infinite product

A product involving an infinite number of terms. Such products can converge. In fact, for positive , the product converges to a nonzero number iff converges.Infinite products can be used to define the cosine(1)gamma function(2)sine, and sinc function.They also appear in polygon circumscribing,(3)An interesting infinite product formula due to Euler which relates and the th prime is(4)(5)(Blatner 1997). Knar's formula gives a functional equation for the gamma function in terms of the infinite product(6)A regularized product identity is given by(7)(Muñoz Garcia and Pérez-Marco 2003, 2008).Mellin's formula states(8)where is the digamma function and is the gamma function.The following class of products(9)(10)(11)(12)(13)(Borwein et al. 2004, pp. 4-6), where is the gamma function, the first of which is given in Borwein and Corless (1999), can be done analytically. In particular, for ,(14)where (Borwein et..

### Multiplication table

A multiplication table is an array showing the result of applying a binary operator to elements of a given set . For example, the following table is the multiplication table for ordinary multiplication. 12345678910112345678910224681012141618203369121518212427304481216202428323640551015202530354045506612182430364248546077142128354249566370881624324048566472809918273645546372819010102030405060708090100The results of any binary mathematical operation can be written as a multiplication table. For example, groups have multiplication tables, where the group operation is understood as multiplication. However, different labelings and orderings of a multiplication table may describe the same abstract group. For example, the multiplication table for the cyclic group C4 may be written in three equivalent ways--denoted here by , , and --by permuting the symbols used for the group elements (Cotton 1990, p. 11).The..

### Russian multiplication

Also called "Ethiopian multiplication." To multiply two numbers and , write and in two columns. Under , write , where is the floor function, and under , write . Continue until . Then cross out any entries in the column which are opposite an even number in the column and add the column. The result is the desired product. For example, for Russian multiplication works because it implements binarymultiplication: 1. If , accumulate . 2. Right-shift one bit. 3. If , exit. 4. Left-shift one bit. 5. Loop.

### Multiplication

In simple algebra, multiplication is the process of calculating the result when a number is taken times. The result of a multiplication is called the product of and , and each of the numbers and is called a factor of the product . Multiplication is denoted , , , or simply . The symbol is known as the multiplication sign. Normal multiplication is associative, commutative, and distributive.More generally, multiplication can also be defined for other mathematical objects such as groups, matrices, sets, and tensors.Karatsuba and Ofman (1962) discovered that multiplication of two digit numbers can be done with a bit complexity of less than using an algorithm now known as Karatsuba multiplication.Eddy Grant's pop song "Electric Avenue" (Electric Avenue, 2001) includes the commentary: "Who is to blame in one country; Never can get to the one; Dealin' in multiplication; And they still can't feed everyone, oh no."..

### Division lemma

When is divisible by a number that is relatively prime to , then must be divisible by .

### Division by zero

Division by zero is the operation of taking the quotient of any number and 0, i.e., . The uniqueness of division breaks down when dividing by zero, since the product is the same for any , so cannot be recovered by inverting the process of multiplication. 0 is the only number with this property and, as a result, division by zero is undefined for real numbers and can produce a fatal condition called a "division by zero error" in computer programs.To the persistent but misguided reader who insists on asking "What happens if I do divide by zero," Derbyshire (2004, p. 36) provides the slightly flippant but firm and concise response, "You can't. It is against the rules." Even in fields other than the real numbers, division by zero is never allowed (Derbyshire 2004, p. 266).There are, however, contexts in which division by zero can be considered as defined. For example, division by zero for in the extended complex..

### Division

Taking the ratio of two numbers and , also written . Here, is called the dividend, is called the divisor, and is called a quotient. The symbol "/" is called a solidus (sometimes, the "diagonal"), and the symbol "" is called the obelus. If left unevaluated, is called a fraction, with known as the numerator and known as the denominator.Division in which the fractional (remainder) is discarded is called integer division, and is sometimes denoted using a backslash, .Division is the inverse operation of multiplication,so that ifthen can be recovered asas long as . In general, division by zero is not defined since the ability to "invert" to recover breaks down if (in which case is always 0, independent of ).Cutting or separating an object into two or more parts is also called division...

### Remainder

In general, a remainder is a quantity "left over" after performing a particular algorithm. The term is most commonly used to refer to the number left over when two integers are divided by each other in integer division. For example, , with a remainder of 6. Of course in real division, there is no such thing as a remainder since, for example, .The term remainder is also sometimes applied to the residueof a congruence.

### Divide

To divide is to perform the operation of division, i.e., to see how many times a divisor goes into another number . divided by is written or . The result need not be an integer, but if it is, some additional terminology is used. is read " divides " and means that is a divisor of . In this case, is said to be divisible by . Clearly, and . By convention, for every except 0 (Hardy and Wright 1979, p. 1). The "divisibility" relation satisfies(1)(2)(3)where the symbol means implies. is read " does not divide " and means that is not a divisor of . means divides exactly. If and are relatively prime, the notation or sometimes is used.

### Long division

Long division is an algorithm for dividing two numbers, obtaining the quotient one digit at a time. The example above shows how the division of 123456/17 is performed to obtain the result 7262.11....The term "long division" is also used to refer to the method of dividing one polynomial by another, as illustrated above. This example illustrates the resultThe symbol separating the dividend from the divisor seems to have no established name, so can be simply referred to as the long division symbol (or sometimes the division bracket).The chorus of the song "Singular Girl" by Rhett Miller (The Believer, 2006) contains the slightly cryptic line "Talking to you girl is like long division, yeah." Coincidentally, Long Division (1995) is also the name of the second album by the band Low...

### Lattice method

The lattice method is an alternative to long multiplication for numbers. In this approach, a lattice is first constructed, sized to fit the numbers being multiplied. If we are multiplying an -digit number by an -digit number, the size of the lattice is . The multiplicand is placed along the top of the lattice so that each digit is the header for one column of cells (the most significant digit is put at the left). The multiplier is placed along the right side of the lattice so that each digit is a (trailing) header for one row of cells (the most significant digit is put at the top). Illustrated above is the lattice configuration for computing .Before the actual multiplication can begin, lines must be drawn for every diagonal path in the lattice from upper right to lower left to bisect each cell. There will be 5 diagonals for our lattice array.Now we calculate a product for each cell by multiplying the digit at the top of the column and the digit at the right of the..

### Percent

The use of percentages is a way of expressing ratios in terms of whole numbers. A ratio or fraction is converted to a percentage by multiplying by 100 and appending a "percentage sign" %. For example, if an investment grows from to , then is times as much as , i.e., 173.08% of . So it is also true that the investment has grown by . A change of a certain percent is sometimes said to be a change of percentage points.

### Unit fraction

A unit fraction is a fraction with numerator 1. Examples of unit fractions include 1/2, 1/3, 1/12, and 1/123456. The famous Rhind papyrus, dated to around 1650 BC, discusses unit fractions and contains a table of representations of as a sum of distinct unit fractions for odd between 5 and 101. As a result, sums of unit fractions are now known as Egyptian fractions.

### Pandigital fraction

A fraction containing each of the digits 1 through 9 is called a pandigital fraction. The following table gives the number of pandigital fractions which represent simple unit fractions. The numbers of pandigital fractions for 1/1, 1/2, 1/3, ... are 0, 12, 2, 4, 12, 3, 7, 46, 3, ... (OEIS A054383).fractions12,2412,37,46,,,,,,,3004

### Mixed fraction

A mixed fraction is an improper fraction written in the form . In common usage such as cooking recipes, is often written as (e.g., 1 ), much to the chagrin of mathematicians, to whom means , which is quite a different beast from .(The author of this work discovered this fact early in his mathematical career after having points marked off a calculus exam for using the recipe-like notation. Future mathematicians are therefore encouraged to avoid mixed fractions, except perhaps in the kitchen.)

### Egyptian number

A number is called an Egyptian number if it is the sum of the denominators in some unit fraction representation of a positive whole number not consisting entirely of 1s. For example,so is an Egyptian number. The numbers that are not Egyptian are 2, 3, 5, 6, 7, 8, 12, 13, 14, 15, 19, 21, and 23 (OEIS A028229; Konhauser et al. 1996, p. 147).If is the sum of denominators of a unit fraction representation composed of distinct denominators which are not all 1s, then it is called a strictly Egyptian number. For example, by virtue of is Egyptian, but it is not strictly Egyptian. Graham (1963) proved that every number is strictly Egyptian. Numbers that are strictly Egyptian are 11, 24, 30, 31, 32, 37, 38, 43, ... (OEIS A052428), and those which are not are 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, ... (OEIS A051882)...

### Egyptian fraction

An Egyptian fraction is a sum of positive (usually) distinct unit fractions. The famous Rhind papyrus, dated to around 1650 BC contains a table of representations of as Egyptian fractions for odd between 5 and 101. The reason the Egyptians chose this method for representing fractions is not clear, although André Weil characterized the decision as "a wrong turn" (Hoffman 1998, pp. 153-154). The unique fraction that the Egyptians did not represent using unit fractions was 2/3 (Wells 1986, p. 29).Egyptian fractions are almost always required to exclude repeated terms, since representations such as are trivial. Any rational number has representations as an Egyptian fraction with arbitrarily many terms and with arbitrarily large denominators, although for a given fixed number of terms, there are only finitely many. Fibonacci proved that any fraction can be represented as a sum of distinct unit fractions (Hoffman..

### Midy's theorem

If the period of a repeating decimal for , where is prime and is a reduced fraction, has an even number of digits, then dividing the repeating portion into halves and adding gives a string of 9s. For example, , and .

If a fixed fraction of a given amount of money is lost, and then the same fraction of the remaining amount is gained, the result is less than the original and equal to the final amount if a fraction is first gained, then lost. This can easily be seen from the fact that(1)(2)

### Least common denominator

The least common denominator of a collection of fractionsis the least common multiple of their denominators.

### Irreducible fraction

An irreducible fraction is a fraction for which , i.e., and are relatively prime. For example, in the complex plane, is reducible, while is not.The figure above shows the irreducible fractions plotted in the complex plane (Pickover 1997; Trott 2004, p. 29).

### Common fraction

A common fraction is a fraction in which numerator and denominator are both integers, as opposed to fractions. For example, is a common fraction, whileis not. Common fractions are sometimes also called vulgar fractions (Derbyshire 2004, p. 171).

### Reducible fraction

A reducible fraction is a fraction such that , i.e., can be written in reduced form. A fraction that is not reducible is said to be irreducible.For example, in the complex plane, is reducible, while is not.

### Ratio

The ratio of two numbers and is written , where is the numerator and is the denominator. The ratio of to is equivalent to the quotient . Betting odds written as correspond to . A number which can be expressed as a ratio of integers is called a rational number.

### Fractran

Fractran is an algorithm applied to a given list , , ..., of fractions. Given a starting integer , the FRACTRAN algorithm proceeds by repeatedly multiplying the integer at a given stage by the first element that yields an integer product. The algorithm terminates when there is no such .The listwith starting integer generates a sequence 2, 15, 825, 725, 1925, 2275, 425, 390, 330, 290, 770, ... (OEIS A007542). Conway (1987) showed that this sequence has an amazing connection with prime numbers, and in fact is a generator for the primes. In particular, the only powers of two (other than 2 itself) that occur in this sequence are those with prime exponent: , , , , ....

### Proportional

If is (directly) proportional to , then is a constant. The relationship is written , which impliesfor some constant known as the constant of proportionality.

### Farey sequence

The Farey sequence for any positive integer is the set of irreducible rational numbers with and arranged in increasing order. The first few are(1)(2)(3)(4)(5)(OEIS A006842 and A006843). Except for , each has an odd number of terms and the middle term is always 1/2.Let , , and be three successive terms in a Farey series. Then(6)(7)These two statements are actually equivalent (Hardy and Wright 1979, p. 24). For a method of computing a successive sequence from an existing one of terms, insert the mediant fraction between terms and when (Hardy and Wright 1979, pp. 25-26; Conway and Guy 1996; Apostol 1997). Given with , let be the mediant of and . Then , and these fractions satisfy the unimodular relations(8)(9)(Apostol 1997, p. 99).The number of terms in the Farey sequence for the integer is(10)(11)where is the totient function and is the summatory function of , giving 2, 3, 5, 7, 11, 13, 19, ... (OEIS A005728). The asymptotic limit..

### Anomalous cancellation

Anomalous cancellation is a "canceling" of digits of and in the numerator and denominator of a fraction which results in a fraction equal to the original. Note that if there are multiple but differing counts of one or more digits in the numerator and denominator there is ambiguity about which digits to cancel, so it is simplest to exclude such cases from consideration.There are exactly four anomalous cancelling proper fractions having two-digit base-10 numerator and denominator:(1)(2)(3)(4)(c.f. Boas 1979). The first few 3-digit anomalous cancelling numbers are(5)(6)and the first few with four digits are(7)(8)The numbers of anomalously cancelling proper fractions having digits in both numerator and denominator for , 2, ... are 0, 4, 161, 1851, ....The numbers of anomalously cancelling proper fractions having or fewer digits in both numerator and denominator for , 2, ... are 0, 4, 190, 2844, ....The concept of anomalous cancellation..

### Permil

The use of permil (a.k.a. parts per thousand) is a way of expressing ratios in terms of whole numbers. Given a ratio or fraction, it is converted to a permil-age by multiplying by 1000 and appending a "mil sign" . For example, if an investment grows from a number to a number , then is times as much as , or 1730.8.

### Subtraction

Subtraction is the operation of taking the difference of two numbers and . Here, is called the minuend, is called the subtrahend, and the symbol between the and is called the minus sign. The expression "" is read " minus ."Subtraction is the inverse of addition, so .The subtraction of a number from itself gives 0, while the subtraction of a real number from a smaller real number gives a negative real number. Subtraction of real numbers can be naturally extended to complex numbers.

### Plus

The addition of two quantities, i.e., plus . The operation is denoted , and the symbol is called the plus sign. Floating-point addition is sometimes denoted .

The combining of two or more quantities using the plus operator. The individual numbers being combined are called addends, and the total is called the sum. The first of several addends, or "the one to which the others are added," is sometimes called the augend. The opposite of addition is subtraction.While the usual form of adding two -digit integers (which consists of summing over the columns right to left and "carrying" a 1 to the next column if the sum exceeds 9) requires operations (plus carries), two -digit integers can be added in about steps by processors using carry-lookahead addition (McGeoch 1993). Here, is the lg function, the logarithm to the base 2.

A quantity to be added to another, also called a summand. For example, in the expression , , , and are all addends. The first of several addends, or "the one to which the others are added" ( in the previous example), is sometimes called the augend.

### Absolute difference

The absolute difference of two numbers and is , where the minus sign denotes subtraction and denotes the absolute value.

### Cyclic number

A cyclic number is an -digit integer that, when multiplied by 1, 2, 3, ..., , produces the same digits in a different order. Cyclic numbers are generated by the full reptend primes, i.e., 7, 17, 19, 23, 29, 47, 59, 61, 97, ... (OEIS A001913).The decimal expansions giving the first fewcyclic numbers are(1)(2)(3)(4)(OEIS A004042).The numbers of cyclic numbers for , 1, 2, ... are 0, 1, 9, 60, 467, 3617, 25883, 248881, 2165288, 19016617, 170169241, ... (OEIS A086018). It has been conjectured, but not yet proven, that an infinite number of cyclic numbers exist. In fact, the fraction of cyclic numbers out of all primes has been conjectured to be Artin's constant . The fraction of cyclic numbers among primes is 0.3739551.When a cyclic number is multiplied by its generator, the result is a string of 9s.This is a special case of Midy's theorem.See Yates (1973) for a table of prime period lengths for primes ...

### Minus

The operation of subtraction, i.e., minus . The operation is denoted . The minus sign "" is also used to denote a negative number, i.e., .

### Sign

Min Max Re Im The sign of a real number, also called sgn or signum, is for a negative number (i.e., one with a minus sign ""), 0 for the number zero, or for a positive number (i.e., one with a plus sign ""). In other words, for real ,(1)For real , this can be written(2)and satisfies(3) for real can also be defined as(4)where is the Heaviside step function.The sign function is implemented in the Wolfram Language for real as Sign[x]. For nonzero complex numbers, Sign[z] returns , where is the complex modulus of . can also be interpreted as an unspecified point on the unit circle in the complex plane (Rich and Jeffrey 1996).

### Full reptend prime

A prime for which has a maximal period decimal expansion of digits. Full reptend primes are sometimes also called long primes (Conway and Guy 1996, pp. 157-163 and 166-171). There is a surprising connection between full reptend primes and Fermat primes.A prime is full reptend iff 10 is a primitive root modulo , which means that(1)for and no less than this. In other words, the multiplicative order of (mod 10) is . For example, 7 is a full reptend prime since .The full reptend primes are 7, 17, 19, 23, 29, 47, 59, 61, 97, 109, 113, 131, 149, 167, ... (OEIS A001913). The first few decimal expansions of these are(2)(3)(4)(5)Here, the numbers 142857, 5882352941176470, 526315789473684210, ... (OEIS A004042) corresponding to the periodic parts of these decimal expansions are called cyclic numbers. No general method is known for finding full reptend primes.The number of full reptend primes less than for , 2, ... are 1, 9, 60, 467, 3617, ... (OEIS A086018).A..

### Trichotomy law

Every real number is negative, 0, or positive. The law is sometimes stated as "For arbitrary real numbers and , exactly one of the relations , , holds" (Apostol 1967, p. 20).

### Negative integer

A negative integer is one of the integers ..., , , , obtained by negating the positive integers. The negative integers are commonly denoted .

### Negative

A real quantity having a value less than zero () is said to be negative. Negative numbers are denoted with a minus sign preceding the corresponding positive number, i.e., .The concept of negative numbers is one that took millennia to become firmly embedded in mathematics. For example, the Greek geometer Diophantus (first or third century AD) rejected negative solutions to equations, and the Indian mathematician Bhaskara (1114-ca. 1185) comments on the negative root of the quadratic equation, "The second value is in this case not to be taken, for it is inadequate; people do not approve of negative roots" (Wells 1986, p. 20). The acceptance of the square roots of negative numbers (i.e., so-called complex numbers) as useful abstract quantities took longer still.

The base 16 notational system for representing real numbers. The digits used to represent numbers using hexadecimal notation are 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, and F. The following table gives the hexadecimal equivalents for decimal numbers from 1 to 30.1111B21152212C22163313D23174414E24185515F2519661610261A771711271B881812281C991913291D10A2014301EThe hexadecimal system is particularly important in computer programming, since four bits (each consisting of a one or zero) can be succinctly expressed using a single hexadecimal digit. Two hexadecimal digits represent numbers from 0 to 255, a common range used, for example, to specify colors. Thus, in the HTML language of the web, colors are specified using three pairs of hexadecimal digits RRGGBB, where is the amount of red, the amount of green, and the amount of blue.In hexadecimal, numbers with increasing digits are called metadromes, those with nondecreasing digits..

### Hereditary representation

The representation of a number as a sum of powers of a base , followed by expression of each of the exponents as a sum of powers of , etc., until the process stops. For example, the hereditary representation of 266 in base 2 is(1)(2)

### Repeating decimal

A repeating decimal, also called a recurring decimal, is a number whose decimal representation eventually becomes periodic (i.e., the same sequence of digits repeats indefinitely). The repeating portion of a decimal expansion is conventionally denoted with a vinculum so, for example,The minimum number of digits that repeats in such a number is known as the decimalperiod.Repeating decimal notation was implemented in versions of the Wolfram Language prior to 6 as PeriodicForm[RealDigits[r]] after loading the add-on package NumberTheory$ContinuedFractions$.All rational numbers have either finite decimal expansions (i.e., are regular numbers; e.g., ) or repeating decimals (e.g., ). However, irrational numbers, such as neither terminate nor become periodic.Numbers such as 0.5 are sometimes regarded as repeating decimals since .The denominators of the first few unit fractions having repeating decimals are 3, 6, 7, 9, 11, 12, 13,..

### Regular number

A regular number, also called a finite decimal (Havil 2003, p. 25), is a positive number that has a finite decimal expansion. A number such as which is not regular is said to be nonregular.If is a regular number, then(1)(2)(3)Factoring possible common multiples gives(4)where (mod 2, 5).The denominators of the first few regular unit fractions are 1, 2, 4, 5, 8, 10, 16, 20, 25, 32, 40, 50, ... (OEIS A003592), which have decimal expansions 1, , , , , , , , , , , , ....The number of decimal digits in a regular number is given by (Wells 1986, p. 60). The numbers of digits in the regular unit fractions are 1, 2, 1, 3, 1, 4, 2, 2, 5, 3, 2, 6, 4, 2, 3, ... (OEIS A117920).

### Figures

A number is said to have " figures" if it takes digits to express it. The number of figures is therefore equal to one more than the power of 10 in the scientific notation representation of the number. The word is most frequently used in reference to monetary amounts, e.g., a "six-figure salary" would fall in the range of to .

### Quaternary

The base-4 method of counting in which only the digits 0, 1, 2, and 3 are used. The illustration above shows the numbers 0 to 63 represented in quaternary, and the following table gives the quaternary equivalents of the first few decimal numbers.111123211112212302211233133123113410143224120511153325121612161002612271317101271238201810228130921191032913110222011030132These digits have the following multiplicationtable.0123000001012320210123031221

### Euler's totient rule

The number of bases in which is a repeating decimal (actually, repeating -ary) of length is the same as the number of fractions , , ..., which have reduced denominator . For example, in bases 2, 3, ..., 6, 1/7 is given by(1)(2)(3)(4)(5)which have periods 3, 6, 3, 6, and 2, respectively, corresponding to the denominators6, 3, 2, 3, and 6 of(6)

### Duodecimal

The base-12 number system composed of the digits 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B. Such a system has been advocated by no less than Herbert Spencer, John Quincy Adams, and George Bernard Shaw (Gardner 1984). In fact, duodecimal still has its advocates, some of whom term it "dozenal."Some aspects of a base-12 system are preserved in the terms dozenand gross applied to the quantities 12 and 144, respectively.The following table gives the duodecimal equivalents of the first few decimal numbers.1111B2119221210221A331311231B44141224205515132521661614262277171527238818162824991917292510A20183026

### Goodstein sequence

Given a hereditary representation of a number in base , let be the nonnegative integer which results if we syntactically replace each by (i.e., is a base change operator that 'bumps the base' from up to ). The hereditary representation of 266 in base 2 is(1)(2)so bumping the base from 2 to 3 yields(3)Now repeatedly bump the base and subtract 1,(4)(5)(6)(7)(8)(9)(10)(11)(12)etc.Starting this procedure at an integer gives the Goodstein sequence . Amazingly, despite the apparent rapid increase in the terms of the sequence, Goodstein's theorem states that is 0 for any and any sufficiently large . Even more amazingly, Paris and Kirby showed in 1982 that Goodstein's theorem is not provable in ordinary Peano arithmetic (Borwein and Bailey 2003, p. 35).

### Ternary

The base-3 method of counting in which only the digits 0, 1, and 2 are used. Ternary numbers arise in a number of problems in mathematics, including some problems of weighing. However, according to Knuth (1998), "no substantial application of balanced ternary notation has been made" (balanced ternary uses digits , 0, and 1 instead of 0, 1, and 2).The illustration above shows a graphical representation of the numbers 0 to 25 in ternary, and the following table gives the ternary equivalents of the first few decimal numbers. The concatenation of the ternary digits of the consecutive numbers 0, 1, 2, 3, ... gives (0), (1), (2), (1, 0), (1, 1), (1, 2), (2, 0), ... (OEIS A054635).111110221210221211022211310131112321241114112242205121512025221620161212622272117122271000822182002810019100192012910021010120202301010Ternary digits have the following multiplicationtable.0120000101220211A ternary representation can..

### Fraction

A rational number expressed in the form (in-line notation) or (traditional "display" notation), where is called the numerator and is called the denominator. When written in-line, the slash "/" between numerator and denominator is called a solidus.A mathematical joke states that 4/3 of people don't understand fractions.A proper fraction is a fraction such that , and a reduced fraction is a fraction with common terms canceled out of the numerator and denominator.The Egyptians expressed their fractions as sums (and differences) of unit fractions. Conway and Guy (1996) give a table of Roman notation for fractions, in which multiples of 1/12 (the uncia) were given separate names.The rules for the algebraic combination of fractions are given by(1)(2)(3)(4)Note however that the above results will not necessarily be reducedfractions...

### Minkowski's question mark function

The function defined by Minkowski for the purpose of mapping the quadratic surds in the open interval into the rational numbers of in a continuous, order-preserving manner. takes a number having continued fraction to the number(1)The function satisfies the following properties (Salem 1943). 1. is strictly increasing. 2. If is rational, then is of the form , with and integers. 3. If is a quadratic surd, then the continued fraction is periodic, and hence is rational. 4. The function is purely singular (Denjoy 1938). can also be constructed as(2)where and are two consecutive irreducible fractions from the Farey sequence. At the th stage of this definition, is defined for values of , and the ordinates corresponding to these values are for , 1, ..., (Salem 1943).The function satisfies the identity(3)A few special values include(4)(5)(6)(7)(8)(9)(10)(11)where is the golden ratio...

### Pythagorean fraction

Given a Pythagorean triple , the fractions and are called Pythagorean fractions. Diophantus showed that the Pythagorean fractions consist precisely of fractions of the form .

### Casting out sevens

A method for verifying the correctness of an arithmetical operation on natural numbers, based on the same principle as casting out nines. The methods of sevens takes advantage of the fact that the residue (mod 7) of a sum (or product) must be equal to the sum (or product) of the residues of the summands (or factors).For example, the correct sum(1)corresponds to a correct sum of residues mod 7(2)where, on the right-hand side, 9 has been replaced by its residue 2 (mod 7).On the other hand, the incorrect sum(3)gives rise to an incorrect sum of residues(4)since the right-hand side should be 0.Tests based on the comparison of residues are not completely reliable since they leave some errors undetected (namely, an incorrect sum can produce a correct sum of residues). Hence it can be helpful to double-check with respect to 7 and 9...

### Casting out nines

"Casting out nines" is an elementary check of a multiplication which makes use of the congruence (mod 9). Let decimal numbers be written , , and their product be . Let the sums of the digits of these numbers be , , and . Then , , and . Furthermore , so . So if and are incongruent (mod 9), the multiplication has been done incorrectly.For example, . The sum-of-digits of 12345 and 67890 are 15 and 30, respectively, and the product of these is 450. Similarly, the sum-of-digits of 838102050 is 27. And , so the check shows agreement.Casting out nines is also an addition test, since , and a subtraction test, since . It can also be used as a division test for (i.e., since .Casting out nines was transmitted to Europe by the Arabs, but was probably developed somewhere on the Indian subcontinent and is therefore sometimes also called "the Hindu check," with "Hindu" simply meaning the people of the Indian subcontinent.The procedure was..

### Digit

The number of digits in an integer is the number of numbers in some base (usually 10) required to represent it. The numbers 1 to 9 are therefore single digits, while the numbers 10 to 99 are double digits. Terms such as "double-digit inflation" are occasionally encountered, although this particular usage has thankfully not been needed in the U.S. for some time. The number of base- digits in a number can be calculated as(1)where is the floor function. For , the formula becomes(2)The number of digits in the number represented in base is given by the Wolfram Language function DigitCount[n, b, d], with DigitCount[n, b] giving a list of the numbers of each digit in . The total number of digits in a number is given by IntegerLength[n, b].The positive integers with distinct base-10 digits are given by 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 23, ... (OEIS A010784). The number of -digit integers is given by(3)(4)(5)(6)where is..

### Arithmetic

Arithmetic is the branch of mathematics dealing with integers or, more generally, numerical computation. Arithmetical operations include addition, congruence calculation, division, factorization, multiplication, power computation, root extraction, and subtraction. Arithmetic was part of the quadrivium taught in medieval universities. A mnemonic for the spelling of "arithmetic" is "a rat in the house may eat the ice cream."The branch of mathematics known as number theoryis sometimes known as higher arithmetic.Modular arithmetic is the arithmetic of congruences.Floating-point arithmetic is the arithmetic performed on real numbers by computers or other automated devices using a fixed number of bits.The fundamental theorem of arithmetic, also called the unique factorization theorem, states that any positive integer can be represented in exactly one way as a product of primes.The Löwenheim-Skolem..

The negadecimal representation of a number is its representation in base (i.e., base negative 10). It is therefore given by the coefficients in(1)(2)where , 1, ..., 9.The negadecimal digits may be obtained with the WolframLanguage code Negadecimal := {0} Negadecimal[i_] := Rest @ Reverse @ Mod[NestWhileList[( - Mod[, 10])/-10&, i,  != 0& ], 10]The following table gives the negadecimal representations for the first few integers(A039723).negadecimalnegadecimalnegadecimal111119121181221219222182331319323183441419424184551519525185661619626186771719727187881819828188991919929189101902018030170The numbers having the same decimal and negadecimal representations are those which are sums of distinct powers of 100: 1, 2, 3, 4, 5, 6, 7, 8, 9, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 200, ... (OEIS A051022)...

### Negabinary

The negabinary representation of a number is its representation in base (i.e., base negative 2). It is therefore given by the coefficients in(1)(2)where .Conversion of to negabinary can be done using the Wolfram Language code Negabinary[n_Integer] := Module[ {t = (2/3)(4^Floor[Log[4, Abs[n] + 1] + 2] - 1)}, IntegerDigits[BitXor[n + t, t], 2] ]due to D. Librik (Szudzik). The bitwise XOR portion is originally due to Schroeppel (1972), who noted that the sequence of bits in is given by .The following table gives the negabinary representations for the first few integers(OEIS A039724).negabinarynegabinary11111111121101211100311113111014100141001051011510011611010161000071101117100018110001810110911001191011110111102010100If these numbers are interpreted as binary numbers and converted to decimal, their values are 1, 6, 7, 4, 5, 26, 27, 24, 25, 30, 31, 28, 29, 18, 19, 16, ... (OEIS A005351). The numbers having the same..

### Reciprocal

The reciprocal of a real or complex number is its multiplicative inverse , i.e., to the power . The reciprocal of zero is undefined. A plot of the reciprocal of a real number is plotted above for .Two numbers are reciprocals if and only if their product is 1. To put it another way, a number and its reciprocal are inversely related. Therefore, the larger a (positive) number, the smaller its reciprocal.The reciprocal of a complex number is given byPlots of the reciprocal in the complex plane are given above.Given a geometric figure consisting of an assemblage of points, the polars with respect to an inversion circle constitute another figure. These figures are said to be reciprocal with respect to each other. Then there exists a duality principle which states that theorems for the original figure can be immediately applied to the reciprocal figure after suitable modification (Lachlan 1893)...

### Long multiplication

Long multiplication is the method of multiplication that is commonly taught to elementary school students throughout the world. It can be used on two numbers of arbitrarily large size or number of decimal digits. The numbers to be multiplied are placed vertically over one another with their least significant digits aligned. The top number is named the multiplicand and the lower number is the multiplier. The result of the multiplication is the product.For example, we can multiply . The number with more digits is usually selected as the multiplicand: The long multiplication algorithm starts with multiplying the multiplicand by the least significant digit of the multiplier to produce a partial product, then continuing this process for all higher order digits in the multiplier. Each partial product is right-aligned with the corresponding digit in the multiplier. The partial products are then summed: Implicit in using this method is the following..

### Multiple

A multiple of a number is any quantity with an integer. If and are integers, then is called a factor of .

### Steffi problem

A homework problem proposed in Steffi's math class in January 2003 asked students to prove that no ratio of two unequal numbers obtained by permuting all the digits 1, 2, ..., 7 results in an integer. If such a ratio existed, then some permutation of 1234567 would have to be divisible by . can immediately be restricted to , since a ratio of two permutations of the first seven digits must be less than , and the permutations were stated to be unequal, so . The case can be eliminated by the divisibility test for 3, which says that a number is divisible by 3 iff the sum of its digits is divisible by 3. Since the sum of the digits 1 to 7 is 28, which is not divisible by 3, there is no permutation of these digits that is divisible by 3. This also eliminates as a possibility, since a number must be divisible by 3 to be divisible by 6.This leaves only the cases , 4, and 5 to consider. The case can be eliminated by noting that in order to be divisible by 5, the last digits of the numerator..

### Quotient

The term "quotient" is most commonly used to refer to the ratio of two quantities and , where .Less commonly, the term quotient is also used to mean the integer part of such a ratio. In the Wolfram Language, the command Quotient[r, s] is defined in this latter sense, returningwhere is the floor function. This is sometimes called integer division.Since usage concerning fractional part/value and integer part/value can be confusing, the following table gives a summary of names and notations used. Here, S&O indicates Spanier and Oldham (1987).notationnameS&OGraham et al. Wolfram Languageceiling function--ceiling, least integerCeiling[x]congruence----Mod[m, n]floor functionfloor, greatest integer, integer partFloor[x]fractional valuefractional part or SawtoothWave[x]fractional partno nameFractionalPart[x]integer partno nameIntegerPart[x]nearest integer function----Round[x]quotient----Quotient[m,..