Write five-digits numbers at random but written numbers are not to be written again. How many times of writing at least can guarantee that a five-digit number divisible by 3 is written?

Answer : 60001

The answer is 60001,how to get it? Please help me to solve itπŸ™

To find the minimum number of times you need to write a five-digit number to guarantee that a number divisible by 3 is written, you can use the principle of the Pigeonhole Principle.

Step 1: We need to find the number of five-digit numbers divisible by 3.

In a five-digit number, the smallest and largest numbers that can be formed are: 10,000 and 99,999.

The sum of the digits from 1 to 9 is 45 (1+2+3+4+5+6+7+8+9). Since any number divisible by 3 will have a digit sum divisible by 3. We can calculate the number of integers between 10,000 and 99,999 that have a digit sum divisible by 3.

The digit sum can range from a minimum of 0 (when all digits are 0) to a maximum of 45 (when all digits are 9).

We can divide the range of possible sums by 3:

Minimum sum divisible by 3 = (0 / 3) * 3 = 0
Maximum sum divisible by 3 = (45 / 3) * 3 = 45

Step 2: We need to find the number of integers divisible by 3 in the range of possible sums.

To do this, we need to find the number of multiples of 3 in the range of possible sums.

Number of multiples of 3 in the range of possible sums = (45 - 0) / 3 + 1 = 15

So, there are 15 possible sums that are divisible by 3.

Step 3: Now, we can determine the number of five-digit numbers that have a digit sum divisible by 3.

Since there are 15 possible sums divisible by 3, and each sum can be formed by different combinations of digits, we multiply 15 by the number of ways to arrange the digits.

To arrange the digits, we can use the concept of permutations.

The number of ways to arrange 5 digits (without repetition) is 5! (Factorial), which is equal to 5*4*3*2*1 = 120.

So, the number of five-digit numbers divisible by 3 = 15 * 120 = 1800.

Step 4: Finally, to calculate the minimum number of times you need to write a five-digit number to guarantee that a number divisible by 3 is written, we need to find the smallest value of n such that:

1800 * n β‰₯ 100,000

Dividing both sides by 1800:

n β‰₯ 100,000 / 1800

n β‰₯ 55.5555

Since n must be an integer, we round up to the nearest whole number to ensure that we have written at least one more than the guaranteed number of digits divisible by 3:

n = 56

So, you need to write at least 56 five-digit numbers to guarantee that a number divisible by 3 is written.

Therefore, the answer is 56.