What is the distribution of the digit sums of the periodic bits of the decimal expansions of the fractions $\frac{1}{n}$?

89 Views Asked by At

someone not specifically mathematically trained just related this they heard:

Take all the fractions of the form $\frac{1}{d}$ with integers d. Select the ones that have periodic decimal expansion. Take the periodic bits and for each calculate the sum of digits.

They claim the distribution of these sums is somewhat unusual or interesting

Having no idea myself but good reason to be procrastinating (I swear!) I made an experiment in Python (rough code here) and behold, the distribution does look odd:

Histogram plot of the distribution of the digit sums of the periodic bits of the fraction 1/n with n<10^4

Can someone explain what is going on here?

1

There are 1 best solutions below

0
On

If $\frac 1d=.\overline S$ where $S$ has length $n$ then $$\frac {10^n}d=S+\frac 1d\implies S=\frac {10^n-1}d$$

And since $9\,|\,(10^n-1)$ we see that $9\,|\,S$ unless $3\,|\,d$...so at least $\frac 23$ of your numbers will have iterated digit sum $9$.

To make it even more dramatic, stick with primes $p>5$. Then in all cases $9$ divides the iterated digit sum.