Digital Numbers & Repunits

Remember that numbers can be expressed in terms of their individual digits. The decimal expansion of a number is its expression as a sum of multiples of powers of ten. E.g. for the decimal number \(8675309,\) \[ 8675309 \;\;=\;\; \mathbf{8} \cdot 10^6 \;\;+\;\; \mathbf{6} \cdot 10^5 \;\;+\;\; \mathbf{7} \cdot 10^4 \;\;+\;\; \mathbf{5} \cdot 10^3 \;\;+\;\; \mathbf{3} \cdot 10^2 \;\;+\;\; \mathbf{0} \cdot 10^1 \;\;+\;\; \mathbf{9} \cdot 10^0 \,. \] Using the number ten as a base is just a convention; we could do this with any other whole number as a base. E.g. the decimal number \(123\) is expressed in binary (base two) as \(1111011\) and is expressed in hexidecimal (base sixteen) as \(7B,\) where \(B\) is eleven, since \[ 123 \;\;=\;\; \mathbf{1} \cdot 2^6 \;+\; \mathbf{1} \cdot 2^5 \;+\; \mathbf{1} \cdot 2^4 \;+\; \mathbf{1} \cdot 2^3 \;+\; \mathbf{0} \cdot 2^2 \;+\; \mathbf{1} \cdot 2^1 \;+\; \mathbf{1} \cdot 2^0 \;\;=\;\; \mathbf{7} \cdot 16^1 \;+\; \mathbf{B} \cdot 16^0 \,. \]

When a number is expressed in a base other than ten, it is conventionally denoted with a subscript. E.g. \(123 = 1111011_2 = 7B_{16}.\)

Analyzing a number’s decimal expansion can lead to some nice “divisibility rules.”

A repunit is a positive integer whose digits are all ones. For example the repunit (in base ten) with 23 digits is \[ \underbrace{111\dots111}_{23\text{ digits}} \;\;=\;\; \sum_{n=0}^{22} 10^n \;\;=\;\; \frac{10^{23}-1}{9} \,. \]