Locate Digits in Concatenated Number Strings
第21讲 数字和 · Lesson 21.1
Turn the endless-looking string 123456789101112… into manageable one-digit, two-digit, and three-digit blocks. Then locate distant positions and add only the digits you actually need.
Read the counting string correctly
Write 1,2,3,… starting with 1, and number the written digits starting at position 1. The symbols are written without commas or spaces. A number’s place in the counting list and a digit’s position in the written string are different ideas.
Build the beginning
Number index
The 12th positive whole number is:
Digit position
The 12th written digit in 123456789101112… is:
Positions 10–13 are the digits of 10 and 11.
Checkpoint
Need a hint for Mission 1?
A numeral is the written form of a number; a position counts one written digit. Count 10 as two positions.
Check your method
The first nine positions are1–9. Positions10,11 hold10; positions12,13 hold11. 10;12;digit1;written digit positions.
Before using the locator
Predict the first digit after position 189. The numbers through 99 use 189 positions, so position 190 starts 100. For a position inside the three-digit block, subtract 1 before dividing by 3: a remainder of 0 means the first digit, 1 the second, and 2 the third.
Build digit-width blocks
Every numeral inside one block has the same number of digits. Count the numerals, then multiply by the width.
1 through 9
9 × 1 = 9Positions 1–9.
10 through 99
90 × 2 = 180Positions 10–189.
100 through 999
900 × 3 = 2,700Begins at position 190.
| Width | Numerals | Digits in block | Cumulative end |
|---|
Checkpoint
Need a hint for Mission 2?
There are 90 two-digit numbers. Multiply the number of numerals by their width.
Check your method
There are9 one-digit and90 two-digit numerals. They use9+180=189 positions. 9;180;189;first position of100 is190.
Use a general Nth-digit locator
Subtract complete blocks until the target lies inside one width. Then divide by that width to locate the numeral and the digit inside it.
The gold box is the target. Blue boxes mark the first digit of a numeral.
Independent locator: position 250
Need a hint for Mission 3?
Subtract 189. Use (remaining − 1) ÷ 3: the quotient counts whole numerals before the target; the remainder chooses its digit.
Check your method
250−189=61. Subtract1:60÷3=20 remainder0, so the target is the first digit of100+20=120. 61;120;place1 from the left;digit1.
Worked example: locate position 207
The worked example first determines exactly which numeral contributes the 207th digit.
Complete practice problem
Write the positive integers consecutively as
Find the sum of the digits in positions 1 through 207.
1. Remove complete blocks
2. Count three-digit numerals
3. Find the sixth one
4. Choose its last digit
Rebuild the worked example location
Need a hint for Mission 4?
After the first 189 digits, group the remaining digits in threes. An exact multiple ends at the last digit of a numeral.
Check your method
207−189=18=6×3. The sixth three-digit numeral is100+6−1=105. 18;six complete numerals;105;last digit5.
Pair 00 through 99 to total 900
The worked example pairs complementary two-digit displays. Every pair has combined digit sum 18.
Choose a pair
The display 00 is only a visual aid. The number 0 contributes digit sum 0.
Checkpoint
Need a hint for Mission 5?
Write each value with two places, including 00. Pair each digit with its complement to 9.
Check your method
Each pair has digit sum18 and uses two of the100 displays. 50 pairs;18;900;no, adding s(0)=0 changes nothing.
Finish the worked example sum through position 207
The target position ends exactly at 105, so add the full digit sums of 100 through 105 to the 0–99 total.
Digits from 100 through 105
original total
The sum of the first 207 written digits is:
General prefix-digit-sum laboratory
Checkpoint
Need a hint for Mission 6?
Add the complete 00–99 block first, then the digit sums of 100 through the endpoint.
Check your method
s(100) through s(105) are1,2,3,4,5,6. Their sum21 joins the first-block total900. 21;921;last complete numeral105;yes.
Sum digit sums over a whole-number range
The notation s(n) means “sum the digits of n.” This is related to the string, but the endpoint is a whole numeral rather than a written position.
Definition
Then s(1)+s(2)+⋯+s(M) adds the digit sum of every whole number from 1 through M.
General range digit-sum laboratory
Checkpoint
Need a hint for Mission 7?
s(n) means the sum of the digits of n, not the sum of all numbers up to n.
Check your method
s(203)=5. From100–109 the digit sums total55;110–119 total65;120 contributes3. 5;900;900+55+65+3=1023;no boundary is required.
Guided practice: add s(1) through s(203)
Split the range into complete decimal blocks, then handle the short tail.
Extra practice
Find the sum of the digit sums of all positive integers from 1 through 203.
Complete the worked example practice
Need a hint for Mission 8?
Every number through 203 is included in full. Split into 1–99, 100–199 and 200–203.
Check your method
100–199 contributes100 hundreds digits plus900 in the last two places. 200–203 contributes2+3+4+5=14. 1000;14;1914;100 numbers.
Try a new problem before the workshop
Locate position 192 in 123456789101112… and find the sum of the first 192 digits.
Compare your reasoning after trying
Positions 1–189 end at 99. The next three digits are 100, so position 192 is 0 and the sum is 900+1=901.
Independent workshop
Use the string 123456789101112… formed from all positive whole numbers, with positions counted from 1. Here s(n) means the sum of the digits of the complete numeral n. Correct all eight answers to complete the workshop.
Need a hint for Mission 9?
Choose the matching method from this lesson. Write one intermediate step and check endpoints, digit restrictions, or carries before checking your answers.
Check your method
Position1000 is the first digit of370. The first15 digits end at the last digit of12; the first50 end at the first digit of30. 0;1;120;3;51;168;1023;1914.
Objective exit ticket
Answer all five correctly and complete the other nine missions to unlock the certificate.
Optional reflection — not automatically graded
Concatenated-String Digit Navigator
This certifies that Student completed all ten missions and can locate distant written digits and sum structured digit ranges.
Chapter 21 • Digit Sums
Need a hint for Mission 10?
Choose the matching method from this lesson. Write one intermediate step and check endpoints, digit restrictions, or carries before checking your answers.
Check your method
Position207 ends105. Position195 ends101, so its digit is1. 9;189;5;921;1.