Cotangent

How many natural numbers are there which are greater than 4000 and less than 5000and in which all the figures are different?.

Solution: