QlarIITy

MathematicsJEE Main 2021 · 18 MarchInteger

The number of times the digit 3 will be written when listing the integers from 1 to 1000 is

Try it before you look.The full solution is on this page, below the answer box, the moment you check. No sign-in needed.

Solution

Core idea. Occurrences of a digit are counted place by place.

Concept refresher. With repetition allowed, rr free places can be filled from nn digits in

N=nrN = n^r

ways, and non-overlapping cases are added.

Picture the situation. Write the numbers from 0 to 999 as three-place strings from 000 to 999; the extra zeros add no 3s, and the number 1000 contains no 3. The question asks how many times the digit is written, so a number like 333 counts three times. It is easiest to count how often 3 appears in each place.

Approach. Count the appearances of the digit in one place and multiply by the number of places.

  1. Step 1: One place

    Fix the digit 3 in one place, say the units place. The other two places can be filled freely in 102=10010^2 = 100 ways, so 3 is written 100 times in that place.

  2. Step 2: All places

    The same holds for the tens and the hundreds places, so the digit is written 3×100=3003 \times 100 = 300 times, and the number 1000 adds none.

Answer. 300

Sanity check. The strings 000 to 999 hold 3000 digits in all, and each of the ten digits appears equally often, so each is written 300 times.

Common wrong answers

  • 271: Counting the numbers that contain a 3 gives 1000−93=2711000 - 9^3 = 271; the question counts every time the digit is written.

Key takeaway

The trap. A number such as 333 contributes three occurrences, not one.

How toppers think. They use symmetry: all ten digits share the 3000 written digits equally.

Remember. Each place: 100 times.

More on Fundamental Principle of Counting