How many 10-digit numbers are there, such that the sum of the digits is divisible by 2?

Meepadoodle May 25, 2020

#1**0 **

Solution by computer program:

count = 0;

for (n = 1000000000; n <= 9999999999; n = n + 1) {

if (sumofdigits(n) % 2 == 0) {count = count + 1;}

}

write(output,count);

output = 2,000,000 numbers

Guest May 26, 2020

#2**0 **

You misunderstood the question! It is asking for the "sum of the digits divisible by 2"! Is 1000,000,000 divisible by 2. No!. Its digits sum up to 1.

The first number whose sum of the digits is divisible by 2 =1,000,000,001 = 2 which is divisible by 2

The last number whose sum of the digits is divisible by 2 = 9,999,999,999 = 90 which is divisible by 2

Now, find the number of terms as follows:

[9,999,999,999 - 1,000,000,001] / 2 + 1 =**4,500,000,000 terms** that are divisible by 2. This makes sense, since half of the 9,000,000,000 numbers, which are 10-digit numbers, are divisible by 2.

Guest May 26, 2020