Solution:
Suppose the claim were not satisfied. Then there exists an index N>10100 such that for all i≥N either ai≤i−d or ai≥i+d holds. In the first case, since i≥N>10100, by the second assumption on the sequence we also have
ai+1≤ai+2d≤i−d+2d=(i+1)+(d−1)
so ai+1≤(i+1)−d must hold. By induction it follows that ai≤j−d for all j≥i.
We have thus shown:
(A) Either ai≥i+d holds for all i≥N, or
(B) there exists an M≥N such that ai≤i−d holds for all i≥M.
Let us first assume that (A) is satisfied. The numbers 1,…,N must, by the first assumption on the sequence, each occur once in the sequence. However, we have ai≥i+d>i≥N for all i≥N, that is, there are only the N−1 sequence terms a1,…,aN−1 that can take one of these values. By the pigeonhole principle this yields a contradiction.
Now let us assume that (B) is satisfied. Let k=max{M,a1,…,aM}. Then the k sequence terms a1,…,ak are all less than k, since for i=1,…M−1 we have ai≤max{a1,…,aM−1}≤k and for i=M,…,k we have ai≤i−d<i≤k. These k numbers thus all lie in the set {1,2,…,k−1}. By the pigeonhole principle there therefore exist two indices 1≤i<j≤k with ai=aj, which contradicts the first assumption on the sequence.
Since we have obtained a contradiction in every case, the claim holds.