Technique
Finding the nth digit of 123456789101112…: count digits block by block
Quantitative Aptitude • Number System
Statement
The numbers 1 to 9 use 9 digits; 10 to 99 are 90 numbers of 2 digits, 180 digits; 100 to 999 are 900 numbers of 3 digits, 2700 digits. To find the digit at position n, subtract the blocks that end before n. Divide what is left by the number of digits per number in the current block: the quotient says how many full numbers are used, the remainder says which digit of the next number it is.
How to use it
- 1Subtract 9, then 180, then 2700, while the position is still beyond each block.
- 2Divide what is left by the digits per number of the block it falls in.
- 3A remainder of 0 means the last digit of the last full number. Otherwise it is that digit of the next number.
Worked example
What is the 50th digit of 123456789101112…?
Step-by-step
- 1After 1 to 9: digits left, in 2-digit numbers.
- 2: 20 full numbers, 10 to 29, then 1 more digit.
Why: Each 2-digit number uses 2 places.
- 3The next number is 30, and its first digit is 3.
Answer
3
Watch out
Counting from 1 instead of from the block's first number (10 or 100) puts the answer one number off. A remainder of 0 means the last digit of a full number, not the first digit of the next.