This is a related question poker hand representation and I got a great accepted answer. The problem can be reduced to a virtual 39 card deck that from what I can tell is 16 bits.
I have 5 numbers 1-39 with none repeating. I need to uniquely identity those 5 numbers with the smallest possible number and not order dependent on the 5. I am pretty sure the number is 2^16. From the accepted answer to the link you go 01, 10, 100, ... and then start folding back. Then use an XOR on that matrix. I tried but I cannot figure out when / how to start folding back.
What is the matrix / array?