# $n$-th digit in the sequence of natural numbers

What's the $n$-th digit in the sequence $S$ of numbers formed by the natural numbers, i.e., $n$-th digit in the sequence 1 2 3 4 5 6 7 8 9 10 11 12... ? For example 11th digit in the sequence is 0.

-
See oeis.org/A007376 and oeis.org/A033307 (actually I cannot see why those sequences are considered distinct) – Marc van Leeuwen Aug 30 '12 at 14:21
The A033307 link has a closed-form expression for $a(n)$, but I think Ross Millikan's answer below is more perspicuous. – MJD Aug 30 '12 at 16:13

The first step is to find what decade you are in. There are $9$ digits from the $1$ digit numbers, $2\cdot 90=180$ digits from the $2$ digit numbers for a total of $189$, and generally $n\cdot 9 \cdot 10^{n-1}$ from the $n$ digit numbers. Once you have found the decade, you can subtract the digits from the earlier decades. So if you want the $765$th digit, the first $189$ come from the first and second decades, so we want the $576$th digit of the $3$ digit numbers. This will come in the $\lceil \frac{576}3 \rceil=192$nd number, which is $291$. As $576 \equiv 3 \pmod 3$, the digit is $1$
Please take a look at this answer: Find the $n^{\rm th}$ digit in the sequence $123456789101112\dots$