For which maximal $N$ there exists an $N$-digit number with the following property: among any sequence of its consecutive decimal digits some digit is present once only?
Alexey Glebov
Let $f(n)$ be the maximal value of $N$ if we allow $n$ distinct digits. So we are looking for $f(10)$ (we can clearly arrange for the leading digit to be nonzero).
Now, one digit has to occur exactly once in the whole word. Before that digit, there must be a word of $n-1$ digits, satisfying the condition, hence of length at most $f(n-1)$, and the same holds for the word behind that digit. Hence $f(n) \le 2f(n-1)+1$.
On the other hand, we can use any construction for $f(n-1)$ and then create a word of length $2f(n-1)+1$ by using this word, then the new digit and then again the old word, and it is clear that this will satisfy the condition. Hence in fact $f(n)=2f(n-1)+1$.
Since $f(1)=1$, it follows easily by induction that $f(n)=2^n-1$ and in particular $f(10)=2^{10}-1=1023$.