Finding a digit in the sequence of all natural numbers.

893 Views Asked by At

I came across a riddle and I wanted to do know if I solved it correctly:

If we write every natural number next to each other: Example: $012345678910111213\cdots$ What is the digit at position $10000$?

My attempt: Left side is the amount numbers and right side is the digit size of the number: $$10 \qquad 1$$ $$90 \qquad 2$$ $$900\qquad 3$$ $$1777.5\qquad 4$$

Now we have $10000=10\cdot 1 + 90\cdot 2+900 \cdot 3+1777.5 \cdot4$

So it should be the second or third digit of $999+1778=2777$

is this correct? And is it possible to write a closed formula to get a specific position?

1

There are 1 best solutions below

0
On BEST ANSWER

To answer the stated question, you need to watch the bookkeeping. If it were a different number you may not be able to guess "second or third digit."

Digit number $10 + 180 + 2700 + 1 = 2891$ is the first digit of $1000$.

Digit number $6891$ is the first digit of $2000$.

Digit number $9991$ is the first digit of $2775$.

Digit number $9999$ is the first digit of $2777$, so the next one is the second digit of $2777$, which is $7$.