Assigning Users the lowest available number in a list

I want to assign every member a number, and when a new user joins I want it to assign the lowest available number. So if I have
101 taken
102 taken
103 available
104 taken
105 taken
106 available

I want it to assign 103 to the next person who joins.

Anyone know how I could do this?

Do a search for
Constraint = available
Sorted lowest to highest
First item

Something like that.