Using Euler’s Theorem, prove that if n is a number not divisible by 2 or 5, then n divides a number consisting of all 9’s.
If n is not a number divisible by 2 or 5, then the number $n$ is odd and does not end in a 0 or 5. These are some divisibility rules that come to mind, but what can I do with these?
Theorem: (Euler) Suppose that a is relatively prime to n. Then $a^{φ(n)}≡1 (mod n)$.
Suppose now that n is divisible neither by 2 nor by 5, and let a=10. Then a and n are relatively prime, and therefore $$10^{φ(n)}≡1(modn)$$ For any k≥1, the number $10^k−1$ has decimal representation that consists only of 9's. So we have shown that if n is divisible neither by 2 nor by 5, then the number consisting of φ(n) 9's is divisible by n.