List the first p rep-units beginning with the smallest rep-unit >= p.
Divide them all by p. The p remainders will be in the list 0,1,2, . . . , (p-1).
If any remainder = 0, we're finished.
Otherwise, we have p remainders chosen from the remaining (p-1) possibilities so some remainders will be duplicates.
Choose two rep-units with the same remainder. Call them x and y.
Then (x-y) is divisible by p since it has a remainder of 0 after division by p. But (x-y) = (power of ten) times (rep-unit). Given that p>5 it can't factor (power of ten) so it must factor (rep-unit).
Edited on March 28, 2014, 4:03 pm
Posted by xdog
on 2014-03-28 16:01:57