I can't prove it but one thing I can be sure of is that

*n* must be a prime number. This is because the length of the period of recurrence in the decimal expansion of $\frac1n$ must be a divisor of $\phi(n)$ (where $\phi$ is the Euler totient function, denoting the number of positive integers not greater than than

*n* which are relatively prime to

*n*). This can be shown as a consequence of Euler's theorem (a generalization of Fermat's little theorem). For

*n* > 2 (and if it's greater than 10 it is certainly greater than 2) $\phi(n)$ is not divisible by $n-1$ unless $n=p$, a prime. (Note that this is only a necessary condition, not a sufficient one: there are some primes

*p* (e.g.

*p* = 11) for which $\frac1p$ has a decimal-expansion period

*less than* $p-1$.)

As for the problem, it appears that there is nothing special about the digit 8:

*all* the digits 0–9 appear in the decimal expansion, in some order or other. I don't know why this is so but I suspect it has to do with the fact that when

*n* is prime, the ring of integers modulo

*n* is a field. (And the fact that for some primes

*p* the period of recurrence is less than $p-1$ may be due to the fact that 10 is not a primitive root modulo

*p*.) Or maybe there is a much simpler, down-to-earth explanation.