NDA Maths · Permutation & Combination

Forming Numbers from Digits

Counting how many numbers can be built from given digits under constraints — number of digits, a leading-zero rule, divisibility, or the sum of all such numbers.

Why this matters

Digit problems are permutations dressed in number rules. The two perennial gotchas are the leading-zero exclusion and divisibility tests; the 'sum of all numbers' shortcut saves real time.

Concept 1 of 3

Counting numbers with digit constraints

Intuition

Building an nn-digit number is filling nn ordered slots from the available digits. The one special rule: the leading digit can't be 0, so fill it first from the non-zero digits.

Definition

Fill positions left to right. Distinct digits: first slot has (non-zero choices), each later slot one fewer. Leading-zero rule: if 0 is available, the first digit has one fewer option; equivalently total arrangements minus those starting with 0. Repetition allowed multiplies the per-slot choices.

Worked example

How many 3-digit numbers have all distinct digits from {1,2,3,4}\{1,2,3,4\}?
  1. No zero present, so just 4P3=4×3×2^4P_3=4\times3\times2.
Answer:2424.
Practice this conceptself-check · 4 quick reps

Try it yourself

How many numbers greater than 1000 can be formed using 0,1,2,30,1,2,3 without repetition?

Practice — Level 1 (4 reps)

Quick reps to lock in the method. Try each, then check.

  1. 1.
    Which digit cannot be 0?
  2. 2.
    3-digit distinct numbers from {1,2,3,4}\{1,2,3,4\}?
  3. 3.
    Handle leading zero by?
  4. 4.
    Repetition allowed: slots are?

From the bank · past-year question

Example 1Permutation & CombinationEASY
How many 4-digit numbers are there having all digits as odd?

[Q3 · Sep · 2024]

Concept 2 of 3

Divisibility constraints

Intuition

Divisibility fixes specific digits. By 2/5/10 → the units digit; by 4 → the last two digits; by 3/9 → the digit sum. Often the digit sum is fixed (e.g. 1+2+3+4+5=151+2+3+4+5=15), which forces divisibility by 3 for every arrangement.

Definition

  • ÷2: units even. ÷5: units 0 or 5. ÷10: units 0.
  • ÷4: last two digits form a multiple of 4. ÷8: last three.
  • ÷3 / ÷9: digit sum divisible by 3 / 9 (independent of order — so a fixed digit set is all-or-nothing).
  • ÷6: divisible by 2 and 3 together.

Worked example

How many 3-digit numbers from 1,2,3,4,51,2,3,4,5 (no repeat) are divisible by 5?
  1. Divisible by 5 ⇒ units digit is 5 (only choice here): 1 way.
  2. First two slots from the remaining 4 digits: 4×3=124\times3=12.
Answer:1212.
Practice this conceptself-check · 4 quick reps

Try it yourself

How many 5-digit primes can be formed using all of 1,2,3,4,51,2,3,4,5?

Practice — Level 1 (4 reps)

Quick reps to lock in the method. Try each, then check.

  1. 1.
    Divisible by 4 depends on?
  2. 2.
    Divisible by 3 depends on?
  3. 3.
    Divisible by 10 needs units digit?
  4. 4.
    5-digit numbers from 1–5: divisible by 3?

From the bank · past-year question

Example 2Permutation & CombinationMODERATE
How many 4-digit numbers that are divisible by 4 can be formed using the digits 1, 2, 3 and 4 (repetition of digits is not allowed)?

[Q18 · Sep · 2025]

Concept 3 of 3

Sum of all numbers formed

Intuition

By symmetry, each digit lands in each position the same number of times. So the sum of all numbers formed is (sum of digits) × (times each appears per place) × (place-value repunit).

Definition

Using nn distinct digits to form all nn-digit numbers: each digit appears in each place (n1)!(n-1)! times. Sum =(n1)!×(sum of digits)×1111n=(n-1)!\times(\text{sum of digits})\times\underbrace{111\ldots1}_{n}. Adjust the repeat count and place-value string for rr-digit selections.

Worked example

Find the sum of all 3-digit numbers formed using 3,4,53,4,5 without repetition.
  1. Each digit appears in each place (31)!=2(3-1)!=2 times; digit sum =12=12.
  2. Sum =2×12×111=2664=2\times12\times111=2664.
Answer:26642664.
Practice this conceptself-check · 4 quick reps

Try it yourself

Each digit of {1,2,3}\{1,2,3\} appears how many times in the units place across all 3-digit numbers (no repeat)?

Practice — Level 1 (4 reps)

Quick reps to lock in the method. Try each, then check.

  1. 1.
    Each digit appears per place how many times (n distinct)?
  2. 2.
    Place-value string for 3-digit sums?
  3. 3.
    Sum of all 3-digit numbers from 3,4,5?
  4. 4.
    Sum formula factors?

From the bank · past-year question

Example 3Permutation & CombinationMODERATE
What is the sum of all three-digit numbers that can be formed using all the digits 3, 4 and 5, when repetition of digits is not\textbf{\text{not}} allowed?

[Q48 · Sep · 2018]

Mastery check — 5 interleaved questions

Try each one before clicking. Questions are interleaved across the concepts above, not grouped — interleaving sharpens transfer.

Example 1Permutation & CombinationEASY
Three-digit numbers are formed from the digits 1, 2 and 3 in such a way that the digits are not repeated. What is the sum of such three-digit numbers?

[Q7 · Apr · 2017]

Example 2Permutation & CombinationMODERATE
How many 5-digit prime numbers can be formed using the digits 1, 2, 3, 4, 5 if the repetition of digits is not allowed?

[Q50 · Apr · 2021]

Example 3Permutation & CombinationHARD
What is the sum of all four-digit numbers formed by using all digits 0,1,4,50,1,4,5 without repetition of digits?

[Q3 · Apr · 2024]

Example 4Permutation & CombinationMODERATE
How many numbers greater than 1000 can be formed using the digits 0, 1, 2 and 3 (repetition of digits is not allowed)?

[Q44 · Apr · 2026]

Example 5Permutation & CombinationHARD
Four digit numbers are formed by using the digits 1,2,3,51,2,3,5 without repetition of digits. How many of them are divisible by 4?

[Q17 · Apr · 2024]

Drill every past-year question on this subtopic

20 questions from the bank — paginated, with cart and Word-export support.

Related notes