So we have an integer and we want an integer such that , where consists of only 7's and 0's.

This is a constructive proof, but I'm sure there are other ways of doing it.

Firstly take a number of the form , constisting only of 1's. Then calculate

If then we can simply multiply r by 7 and we are done.

If not then we find 2 other numbers of the form > such that . Then is divisible by n and consists only of 1's and 0's, we simply multiply this by 7 and we are done.

The justification for the existence of such is that if we take elements from the set , then there must be at least 2 with the same remainder mod n.

Pomp.