December 18th, 2004, 1:07 am
We shall fight them one by one!As Tomfr says, N is equal to 2^1999. Let K(x) be the number of digits in the decimal representation of x and let Z(x) be the position of the rightmost zero in the decimal representation of x counted from the right[*] starting from 0, so K(1024) = 4 and Z(1024) = 2, and it will be convenient to define Z(x) = K(x) if the decimal representation of x does not contain the digit 0, so that Z(512) = 3Observe, that if x is a power of 2 and y = x + x * 5^Z(x), then Z(y) > Z(x).Build a sequnce of multiples of N: x1 = N, x2 = x1 + N* 5^Z(x1), ... until either Z(xk) > 1999 or K(xk) = Z(xk).In the latter case, we have found a multiple of N which does not contain the digit 0.In the former case let M be the element of the sequence such that Z(M) > 1999. Now we can patch the zeros in the decimal representation of M by adding a multiple of 10^1999 as follows.If Z(M) < K(M), then let y1 = M + 10^Z(M). The number y1 is a multiple of N since 10^Z(M) is and K(y1) = K(M).If we continue this process we end up with a sequence y1, y2 = y1 + 10^Z(y1), ... This increasing sequence of numbers terminates since K(yi) = K(M). The last element of this sequence does not contain the digit 0 in its decimal representation.[*] was "leftmost zero in the decimal representation of x counted from the left" which is wrong, as pointed out by zerdna
Last edited by
xanuda on December 18th, 2004, 11:00 pm, edited 1 time in total.