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

Posted by xdog
on 20140328 16:01:57 