How many numbers exceeding 999 and not exceeding 5000 can be formed, such that each digit is any of the first six whole numbers?
How many four digit natural numbers not exceeding 4321 can be formed with the digits 1,2,3 and 4, if the digits can repeat ?