In my article “Nines in Binary”, I proved the following: positive integers of the form 10n-1, that is, integers made up of n digits of 9s, have binary representations with exactly n digits of trailing 1s. Pat Ballew made a clever observation, adapting my result to prove an equivalent statement for base 5 (quinary): positive integers of the form 10n-1 have quinary representations that have exactly n digits of trailing 4s. For example, 9999 in decimal is 304444 in quinary.
In “Nines in Binary”, I derived an expression for 10n – 1 that shows its structure as a binary number:
10n – 1 = (5n – 1) 2n + (2n – 1)
Pat derived a similar expression for 10n – 1 that shows its structure as a quinary number:
10n – 1 = (2n – 1) 5n + (5n – 1)
In essence, he swapped the 2s and 5s, making it the “dual” of my formula, if you will.
I’ll show the details of the derivation and prove why the formula works.
Continue reading “Nines in Quinary”