1982 AHSME Problems/Problem 11
Problem
How many integers with four different digits are there between and such that the absolute value of the difference between the first digit and the last digit is ?
Solution
All of the digits of the numbers must be 0 to 9. If the first and last digits are x and y, we have and or and Substituting we have and Thus and which yields 16 pairs (x, y) such that the absolute value of the difference between the x and y is However, we are not done. If 0 is the last digit ( with the pair (0, 2):) then we won't have a 4 digit number, so our real value is 15. Because our digits are distinct, there are ways to fill the middle 2 places with digits, thus by the multiplication principles (counting) there are numbers that fulfill these circumstances.