I understand that this is an old question, but I came across it, found a much better approach and decided that I would share it.
You have an upper bound for your sequence number N, so let's take advantage of this. Let them say that N <2 32 β 4.3 * 10 10 . Now every time you need a new identifier, you simply select a random 32-bit number R and combine it with R xor N (zero-pad before concatenation). This gives a unique unique 64-bit identifier, which you can designate with only 16 hexadecimal digits.
This approach completely prevents collisions, because two identifiers that have the same random component necessarily have different xor-ed components.
Bonus function: you can split such a 64-bit identifier into two 32-bit numbers and xor them with each other to restore the original serial number.
Oscarj
source share