Thanks! That saves me a week.
Consider: 1/7 = 0.142857 (repeating) = 142857/999999 so 999999 must be divisible by 7. Taking the 9's out leaves 111111, and then we can take out 111 leaving 1001, so 1001 is divisible by 7. This can also be done just by saying 999999 is 10^6-1 = (10^3-1)(10^3+1), where that last is of the form you are interested in.
Ultimately Euler's theorem (a^phi(n)=1 mod n) is the root of many of the divisibility results. For n=7, phi(n)=6, so 10^6=1 mod 7, so 10^6-1 divides 7, and this is (10^3+1)(10^3-1). So the repeating small primes (11 every second value, 7 every third, etc.) can be seen more or less directly, since if 10^phi(n) == 1 (mod n), so does 10^(k phi(n)) for positive integer k.
Patterns in factors such as 99990001 are just arithmetic tricks (what do I need to multiply 10001 by to get 1000000000001) visible in some primes. In this case it is 10^8 - 10^4 + 1 which shows up as those repeated 9's and 0's.
-tom