Is there an arithmetical chain of operations to change an atomic croissant increment number in a 5 digit unique number looking random?

13 Views Asked by At

I am working on a project where I would like to create identifiers for documents. I do have the document count at every new document, so I could name these identifiers in croissant order, e.g.

00001 00002 ... 00235

However, it both indicates their order and gives an hint about the total number of docs.

Is there an arithmetical trick to convert a croissant number in an unique 5 digit counterpart?

To sum up the constrains: - It takes a 5 digit number input - It returns another one - It never returns the same number given a different input number

I will implement it in Javascript, so I have at my disposal every basic math function.

Please let me know if you need more details.