[Math] The number of 5-digit numbers such that their sum of digits is even is

combinatorics

I tried this problem by counting the number of 5-digit numbers and then dividing it by 2 just like we do for three digits. Please help. Thank you.

Best Answer

In how many ways can the five digit number be chosen so that the sum of digits is even? The first digit can be chosen in 9 ways (since it can't be a 0), the second in 10 ways, the third in 10 ways, the fourth in 10 ways, and the fifth in five ways (the last digit must be one of the five even digits if the first four digits add up to an even number, and odd otherwise, so that the total sum is even). This gives $9 \times 1000 \times 5 = 45000$, which is half the number of 5 digit numbers.