# how many 9 digit numbers have the property that the product of their firsts and last digits is even?

How many 9 digit numbers have the property that the product of their firsts and last digits is even?

I tried listing them out, but there's probably way too many. This is a basic counting problem.

• Welcome to Mathematics Stack Exchange. Note that a product is even iff at least one factor is even Commented Nov 27, 2020 at 3:09
• Hint: How many 9 digit numbers have their first digit even? How many 9 digit numbers have their last digit even? How many 9 digit numbers have their first and last digits even? Commented Nov 27, 2020 at 3:09
• Note that you have to specify whether the leftmost digit can be 0. Also, as I read the problem, the 7 inner digits are not constrained in any way. Commented Nov 27, 2020 at 3:12

The product of the first and last digits is even iff they are not both odd. There are $$9×10$$ ways to choose the first and last digits; of those $$5×5$$ result in an odd product due to both digits being odd. The remaining seven digits may be chosen arbitrarily, so the answer is $$(9×10-5×5)10^7=65\cdot10^7$$.