Digital Numbers & Repunits

Sometimes we like to 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 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 \,. \] You can do this for numbers besides ten too; this is how numbers are expressed in different bases. E.g. the decimal number \(123\) is written as \(1111011\) in binary (base two) 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 \,. \)

Analyzing a number’s decimal expansion can lead to some easy “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} \,. \]