Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|cite|improve this question
See and (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
up vote 4 down vote accepted

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$

share|cite|improve this answer

Please take a look at this answer: Find the $n^{\rm th}$ digit in the sequence $123456789101112\dots$

In the second link, please read through p. 9-12 (specially 12, since there are some tips on how it can be implemented.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.