Question Error Report

Thank you for reporting, we will resolve it shortly

Back to Question

Q. How many integers with four different digits are there between 1000 and 9999 such that the absolute value of the difference between the first digit and the last digit is 2?

Permutations and Combinations

Solution:

In the set $\{0,1, \ldots . ., 9\}$ there are sixteen pairs of numbers $\{(0,2),(2,0),(1,3), \ldots .$.$\} whose$ difference is \pm 2 . All but $(0,2)$ can be used as the first and last digit, respectively, of the required number. For each of the 15 ordered pairs, there are $8 \cdot 7=56$ ways to fill the remaining middle two digits. Thus there are $15 \cdot 56=840$ numbers of the required form.