That's generally not a really good idea, as reusing old IDs can cause some weird issues like people inhereting other people's profiles and stuff. Plus, it isn't like you're going to overflow a 32 bit int anytime soon.
But if you must, then you've got a few ways to do it. Generally, the easiest way is to just grab x identifiers at a time, and walk through them looking for a missing one. Performance wise, this can be a very expensive thing to do on large databases, which is the other reason doing this is a bad idea.