We have the infinite sequence made from concatenation of consecutive natural numbers: $123456789101112131415\ldots$ There is also a function $f$, where $f(n)=k$ if the digit on the $10^n$'th position is from natural number with $k$ digits (so for example $f(1)=2$ because on the $10$'th position in the sequence there is $1$ from $10$, which is a 2-digit number.
The problem asks us to find $f(100005)$.
This is a problem from an exam from my discrete math class, yet I don't know which concept should I use. I only covered sums, binomial coefficients, generating functions, Stirling numbers and Inclusion-exclusion principle. I don't see however how any of these concepts are connected to this problem. Any hints?