🧠 HugeMathBrain
Free teacher downloads

Grade 4 puzzle 8: Count digit occurrences by position

A free grade 4 math puzzle that teaches Count digit occurrences by position. Try it first — the hint and the full solution open when you are ready.

Problem 8 · Count digit occurrences by position · 5 points

Made by AI and not reviewed by a real person.

Ola writes every number from 1 to 9999. In the numbers whose digits add up to 14, how many times does she write the digit 7?

Illustration for problem 8
  1. 112
  2. 36
  3. 140
  4. 138
  5. 144
Show a hint
  • Count written 7s, not just numbers: one number might contribute twice. You can imagine zeros in front of shorter numbers.
  • Choose a place for one 7. Count the ways the other three digits can add up to what is needed by considering their first digit in turn.
Show the answer and solution

Answer: E — 144

Imagine every number written with four digits, adding zeros in front if needed. Choose the place of a written 7; the other three digits must add up to 7. If the first of those digits is 0, there are 8 ways to choose the final two; if it is 1, there are 7 ways; and so on down to 1 way. That makes 8 + 7 + 6 + 5 + 4 + 3 + 2 + 1 = 36 for each of the four places, or 144 written 7s. The tempting answer 138 counts numbers instead: six numbers have two 7s and must each contribute twice.

Solve it in the app More grade 4 puzzles

← Problem 7 · All 12 grade 4 puzzles · Problem 9 →