Show that if a positive integer $ n $ is composite then $ R(n) = \frac{10^{n}-1}{9}= \underset{n\text{ times}}{\underbrace{111...11}} $ is composite
I attempted a both a normal proof and proof by contradiction by trying:
$ n = ak $
show if $ ak\equiv 0 \mod a $ then $ (10^{ak}-1) \equiv 0\mod (10^a-1) $
I reached a point where I began to go around in cirlces. Maybe I'm going down the wrong track. Any ideas ?
R(1)=1
R(2)=11
R(3)=111
R of n is a function for the number of digits in a natural number in which each digit is 1. If n is even, the number will be divisible by 11. If n is divisible by 3, the number will be divisible by 3 and by 111. If n is divisible by 5, R(n) is divisible by 11111. If n is divisible by 7, R(n) is divisible by 1111111, which has 7 digits, all of which are 1. Let p be any prime and substitute p for n. If n is divisible by $p$, then R($p$) is divisible by a number which has $p$ digits, each of which is 1.