Counting up from one, it's the first number that contains a "Y"
... First I count all the 
numbers of type 5xxx (where x can be a number ... Then I add all the numbers of 
type y5xx (where y can be 1, 2, 3, 4, 6, 7, 8, 9).