Passcodes without repetition

Question

How many ways are there to form a five-digit number satisfying the following conditions using only the numbers from 1,2,3,4,5,6,7. Repetitions are not allowed.

  1. No restrictions.
  2. The number must be greater than 30,000.
  3. The number must be odd.
  4. The number must be greater than 30,000 and odd.

Solution

  1. (75)×5!=2,520
  2. 5×(64)×4!=1,800
  3. 4×(64)×4!=1,440

Case 1: Start with an odd number.
Number of ways =3×3×(53)×3!=540.

Case 2: Start with an even number.
Number of ways =2×4×(53)×3!=480.

Required number of ways =540+480=1,020

Skills used