Our way of writing an integer M using the ten digits amounts to decomposing M in terms of powers of 10. For example, we write 216 = 6 + 1 × 10 + 2 × 102. This may seem self-evident because we know 216 through its written representation: positional notation, which we owe to Indian and Arab mathematicians, uses this decomposition to represent numbers. In fact, the digits 6, 1 and 2 can be recovered by a very simple algorithm: 6 is the remainder when 216 is divided by 10 (more precisely, 216 = 6 + 21 × 10). Likewise, 1 is the remainder in the Euclidean division of 21 by 10 (since 21 = 1 + 2 × 10). Finally, 2 remains; since it is strictly less than 10, the process stops.

The art of writing numbers

The algorithm works just as well if 10 is replaced by any other integer p greater than or equal to 2. For example, let p = 5 and decompose M = 216 in this way. We have 216 = 1 + 5 × 43, then 43 = 3 + 8 × 5, and finally 8 = 3 + 1 × 5; since 1 is strictly less than 5, the process stops. Just as the sequence of remainders (6, 1, 2) represented 216 in base 10, (1, 3, 3, 1) represents it in base 5, and hence 216 = 1 + 3 × 5 + 3 × 52 + 1 × 53. Now let us decompose 216 with p = 3; we obtain the sequence (0, 0, 0, 2, 2); the first three zeros show that 216 is divisible by 33. With p = 2, we obtain the sequence (0, 0, 0, 1, 1, 0, 1, 1); similarly, 216 is divisible by 8 = 23, which accounts for the first three zeros. Once the integer p ≥ 2 has been fixed, every positive integer M can be decomposed in this way (and conversely, every finite sequence of integers strictly less than >p corresponds to such a number; this can be seen by considering the base-10 representation of numbers).

Having established notation for the positive integers, we proceed through two successive extensions. The first introduces notation for terminating decimals, namely numbers that yield an integer when multiplied by some power of 10; they are written by placing a decimal point after the integer part. By then appending digits indefinitely after the decimal point, we define new numbers—the real numbers—as limits of terminating decimals.

Leftmost digits first!