Determining which number lies in sequence $1234567891011\ldots$ on the $10^{100005}$'th position 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?
 A: There are $9$ one digit numbers, which fill the first $9$ positions.  There are $90$ two digit numbers, which fill the next $180$ positions.  There are $900$ three digit numbers, which fill the next $2700$ positions.  The position at the end of the $k$ digit numbers is $\sum_{i=1}^k9i10^i$  You need to sum this series and find the smallest $k$ such that the sum is greater than $10^{100005}$
A: So, define $g(n)$ to be the number of digits of the number at the $n$th digit of this number.
You are looking for $f(n)=g(10^n)$.
$g(n)=k$ if and only if:
$$1+\sum_{i=1}^{k-1} i(10^{i}-10^{i-1})\leq n < 1+\sum_{i=1}^{k} i(10^i-10^{i-1})$$
So you need a closed form for $$m(k)=1+\sum_{i=1}^{k} i(10^i-10^{i-1})=1+9\sum_{i=1}^k i10^{i-1}$$
It can be shown that:
$$\sum_{i=1}^{k-1} iz^{i-1} = \frac{(k-1)z^k - kz^{k-1}+1}{(z-1)^2}$$
With $z=10$ this gives $$m(k)=\frac{1}{9}\left((k-1)10^k-k10^{k-1}+10\right)$$
Then you are trying to find the smallest $k$ so that $m(k)>10^{100005}$.
Definitely $k\approx 100000$. You'd have to try some values.
