Prove that the numbers that begin with 1 and end with 1, with any number of 2s in the middle, and all 1s and 2s separated by 00 are composite.

For example:

1002001

1002002001,

1002002002001,

1002002002002001

... but it demonstrates the fact.

If you perform the long division of 1001 by 7, you find 143.

If you perform the long division of 1002001 by 7, you find 143143.

If you perform the long division of 1002002001 by 7, you find 143143143.

In short, if you look at the mechanism of doing the long division (go ahead and actually carry out the long division steps), you find that the insertion of every extra '200' in the middle, just repeats exactly the same steps as the previous '200'.

**Here's the cycle:**
Namely you have a remainder of 2, drop the new 2 down (22), and 7 goes into 22 3 times with a remainder of 1. Drop the the 0 down (10), and 7 goes into 10 1 time with a remainder of 3. Drop the 0 down (30), and 7 goes into 30 4 times with a remainder of 2, bringing us back to the beginning of the cycle.

This continues until you end with the final '1' instead of a 2. With the final '1', you have (21) and the process ends with a 3.

Clearly, since this is always divisible by 7, the number is composite.

I look forward to seeing someone's more formal solution.

*Edited on ***October 10, 2003, 2:54 pm**