21.3Math Education • Chapter 21
Lesson progress0 / 10
Chapter 21 • Digit Sums

Count Numbers with Exact or Modular Digit Sums

第21讲 数字和 · Lesson 21.3

Turn a digit-sum condition into a finite, organized count. Use a complete case table when the sum must equal a target, and use remainder classes when only divisibility matters.

Fix the places → Count each case once → Verify the total
original pages 121–12510 missionsExact-sum enumeratorModular range laboratory
Your answers save automatically in this browser.
Your toolkit: s(n) means the sum of the decimal digits of n. For example, s(203)=2+0+3=5. Try each checkpoint yourself, then open its on-page hint if you get stuck. No lesson or external chat is needed.
Mission 1

Choose the right kind of digit-sum condition

An exact condition names one total. A modular condition asks only which remainder class the digit sum belongs to.

Not complete

Exact digit sum

s(n)=24

The digits must add to exactly 24. A complete count usually needs a table of cases.

Modular digit sum

s(n)≡0 (mod 5)

The digit sum may be 0, 5, 10, 15, 20, … . Zero is a multiple of 5 too; whether it can occur depends on the allowed numbers. Only the remainder matters.

Live condition scanner

Do not confuse these statements: two numbers may have the same digit-sum remainder without having the same digit sum.

Checkpoint

Need a hint for Mission 1?

Add the digits first, then reduce only if a remainder is requested.

Check your method

1+5+8+9=23;23=5×4+3. Equal remainders can come from different sums. 23;equals one target;3;no.

Build remainder counts instead of guessing

For one displayed digit 0–9, the counts for remainders 0,1,2,3 modulo 4 are 3,3,2,2. Appending a digit adds its remainder. For two displayed digits, remainder 0 has 3×3+3×2+2×2+2×3=25 possibilities. Applying the same four-case multiplication to each target gives counts 25,26,25,24. Repeat once more for three digits to obtain 249,251,251,249. These are counts of fixed-width suffixes including leading zeros, not three-digit positive numbers.

Mission 2

Count four-digit numbers whose digit sum is divisible by 5

The worked example fixes the first three digits, then counts which units digits complete the required remainder.

Not complete
Example 2

original problem

How many four-digit positive whole numbers have a digit sum divisible by 5?

900 first-three-digit prefixes × 2 valid units digits = 1800

Why exactly two units digits?

Prefix sum mod 5Units digits that finish at remainder 0
00, 5
14, 9
23, 8
32, 7
41, 6

Try a first-three-digit prefix

314?

Rebuild the worked example count

Need a hint for Mission 2?

Every fixed three-digit prefix has two valid units digits modulo5.

Check your method

There are900 prefixes100–999. For314, the prefix sum8 needs units remainder2, so digits2 and7 work. 900;2;1800;list2,7 in either order.

Mission 3

Use a fixed-length modular counting laboratory

For moduli other than 5, the remainder classes need not be equally large. Dynamic counting keeps every place and leading-digit rule organized.

Not complete

Count fixed-length positive whole numbers

Method: after each digit place, store how many partial numerals have each possible remainder. Then extend every partial numeral by digits 0–9.

Checkpoint

Need a hint for Mission 3?

The counts in this checkpoint exclude leading zero.

Check your method

Three-digit multiples of3 run102–999:300 numbers. Five-digit prefixes1000–9999 each allow two units digits modulo5. 300;18000;largest remainder6;no.

Mission 4

Count exact digit sum 24 below 2000

An exact sum requires a complete case table. Here the leading digit is forced, so the hundreds digit controls the remaining two-digit sum.

Not complete
Example 6

original problem

How many four-digit positive whole numbers below 2000 have digit sum 24?

1+h+t+u=24 ⟹ h+t+u=23

Why h starts at 5

The final two digits can total at most 18. Therefore:

23−h≤18 ⟹ h≥5

The possible hundreds digits are 5, 6, 7, 8, and 9.

Complete candidate list

Hundreds digit hRequired t+uOrdered (tens, ones) pairs; reversing different digits makes a different numberCount
Total15

Rebuild the worked example argument

Need a hint for Mission 4?

Use four-digit numbers1000–1999; repeated digits are allowed.

Check your method

After the leading1, h+t+u=23. Hundreds digits5–9 leave1,2,3,4,5 ordered pairs respectively. 1;23;5;total15.

Mission 5

Complete the guided practice for digit sum 26

The worked example excludes 1997 after the complete count. Count first; remove the named value second.

Not complete
Guided Practice 4

Extra practice

How many other four-digit positive whole numbers below 2000 have the same digit sum as 1997?

s(1997)=1+9+9+7=26

All qualifying values

6

Named value removed

1997

Other values

6−1=5

Checkpoint

Need a hint for Mission 5?

Count all four-digit sum-26 values before excluding1997.

Check your method

The six are1799,1889,1898,1979,1988,1997. 26;six;exclude1997;five remain.

Mission 6

Use a general exact digit-sum enumerator

Choose the number of digits and a target. The laboratory counts every numeral exactly once and organizes the total by leading digit.

Not complete

Exact-sum laboratory

The first digit cannot be zero. Digits may repeat unless “Require no repeated digit” is selected. The checkpoint below allows repeated digits and uses its printed lengths and sums.

Leading digitNumber of completions

Candidate numerals

Completeness check: a candidate list is complete only after every possible leading digit and every legal remaining sum has been counted.

Checkpoint

Need a hint for Mission 6?

These checkpoints allow repeated digits.

Check your method

Sum25 gives799,889,898,979,988,997. For sum10, hundreds digits1–9 give10,9,8,7,6,5,4,3,2 choices. 6;54;smallest799;largest997.

Mission 7

Count a digit-sum remainder over a bounded range

A range may cross several leading-digit blocks. Count each block with the remainder needed from its suffix.

Not complete
Exercise 9

original exercise

From 1999 through 5999, how many positive whole numbers have a digit sum divisible by 4?

Suffix counts for 000–999

Assemble the range

1999 onlys(1999)=281
2000–2999suffix remainder 2251
3000–3999suffix remainder 1251
4000–4999suffix remainder 0249
5000–5999suffix remainder 3249
1+251+251+249+249=1001

General bounded-range modular laboratory

Both endpoints are included. If you include 0, its digit sum is 0. A target remainder must be less than its modulus.

Checkpoint

Need a hint for Mission 7?

Both endpoints1999 and5999 are included.

Check your method

Three-place suffix remainder counts modulo4 are249,251,251,249. Include1999 once, then the four thousand-blocks. 249;251;original total1001;range1–200 modulo7 count26.

Mission 8

Add a distinct-digit restriction

Distinct digits add a “used digit” condition. The smallest possible sum of five distinct digits is 0+1+2+3+4=10, so a target sum of 7 can use at most four digits.

Not complete
21 • Question 6

Transfer problem

How many positive whole numbers have digit sum 7 and no repeated digit?

Count by numeral length

1+7+18+18=44

Distinct-digit exact-sum explorer

Rebuild the worked example-transfer count

Need a hint for Mission 8?

No leading zero and no repeated digit anywhere.

Check your method

One digit:7. Two digits:16,25,34,43,52,61,70. Three-digit sets {0,1,6},{0,2,5},{0,3,4} give4 orders each, and{1,2,4} gives6. Four-digit set{0,1,2,4} gives24−6=18 orders. Counts1,7,18,18;total44. Five distinct digits already sum to at least10.

Try a new problem before the workshop

How many two-digit numbers have digit sum 17? Explain why your list is complete.

Compare your reasoning after trying

Only 89 and 98 work. A tens digit below 8 would require a units digit above 9. There are 2.

Mission 9

Independent workshop

Digits may repeat unless a question explicitly requires distinct digits; a numeral cannot begin with zero. Correct all eight answers to complete the workshop.

Not complete
0 / 8
Need a hint for Mission 9?

The sum24 and sum26 questions concern four-digit numbers below2000.

Check your method

Keep the original ranges, leading-digit rules and exclusion of1997. 2;1800;15;6;5;6;1001;44.

Mission 10

Objective exit ticket

Answer all five correctly and complete the other nine missions to unlock the certificate.

Not complete
0 / 5

Optional reflection — not automatically graded

21.3

Digit-Sum Counting Architect

This certifies that Student completed all ten missions and can count numbers under exact, modular, bounded-range, and distinct-digit sum conditions.

Chapter 21 • Digit Sums

Need a hint for Mission 10?

Each counting question asks how many numbers, not for a list.

Check your method

The two-digit sum16 values are79,88,97; repeated digits are allowed. 15;1800;54;26;three.