TITLE: Does every prime $p \neq 2, 5$ divide at least one of $\{9, 99, 999, 9999, \dots\}$?
QUESTION [5 upvotes]: I was thinking of decimal expressions for fractions, and figured that a fraction of the form $\frac{1}{p}$ must be expressed as a repeating decimal if $p$ doesn't divide $100$. Thus, $\frac{p}{p}$ in decimal would equal $0.\overline{999\dots}$ for some number of $9$s, thus there must be some amount of $9$s such that $p | 999...$ in order for a decimal representation of $\frac{1}{p}$ to be possible.
Furthermore, the question could be rephrased to "an infinite number of" since if it divides $999\dots$ where there are $k$ nines, it also divides when there are $2k, 3k, \dots$ nines.
Is this reasoning correct? If so, this is how I thought about proving it:
We can reduce the set to $\{1, 11, 111, 1111, \dots\}$ since $p=3$ obviously works.
Let $a_k = 111\dots$ where there are $k$ ones. This satisfies the recursion $a_k = 10a_{k-1} + 1$
But I'm unsure what to do past this point (tried looking at modular cases or something but wasn't able to get anywhere). Am I on the right track at all? Is this "conjecture" even correct?

REPLY [2 votes]: Even without knowledge of little Fermat you can solve this. By the pigeonhole (box) principle, the map $\rm\:k\mapsto 10^k\ (mod\ n)\:$ from $\,\Bbb N\,$ to $\rm\,\Bbb Z/n\Bbb Z\:$ is not $1$-$1,$ therefore there exist naturals $\rm\:j\!+\!k > j\:$ such that $\rm\: 10^{\,j+k}\equiv\,10^{\,j}\ (mod\ n),\ $ i.e. $\rm\ n\:|\:10^j(10^k-1).$ Thus $\,(n,10)=1\,\Rightarrow\,n\mid 10^k-1\,$ follows by Euclid's Lemma.