The set of numbers {9, 99, 999, 9999, ...} has some interesting properties. One of these has to do with factorization. Take any number n that isn't divisible by 2 or by 5. You will be able to find at least one number in the set that is divisible by n. Furthermore, you won't need to look beyond the first n numbers in the set.

Prove it.

(*from http://www.ocf.berkeley.edu/~wwu/riddles/)*

(In reply to

re: by levik)

that is a good point, which arises because i didnt

explain this well:

"because the property of differences, each N()

must have a different r."

consider that if two elements N(n), N(n')

in N(1)..N(p) have the same r, it follows that the

difference between them is exactly divisible by p.

N(n) % p = r and N(n') % p = r -> N(n) - N(n') % p = 0

because of the differences property:

10^x * N(n-n') % p = 0. if p is neither 2m or 5m, then

10^x * N(n-n') % p = 0 -> N(n-n') % p = 0,

and

N(n-n') < N(p)

in words, if two of the remainders for N(1)..N(p) were

the same, then their difference would be divisible. but

because the difference is itself a member of N, then

there would be some N() divisible by p.

this argument breaks down for p = 2m or 5m because of

the 10^x term in

N(n) - N(n') = 10^x * N(n-n')

which contains 2,5 factors