In reply to bachan21:
There is absolutely no way of replicaiting the functionality of the randc modifier without using an array of used or unused values. If there are any constraints on the random variable, you have no idea how many values need to be generated before you need to restart the cycle.
If you are looking for a synthesizable cycle of noncontiguous values, you might want to study linear feedback shift registers (LFSRs).
It might help to explain where your requirements are coming from if not just an interview question.