Unique number to represent a combination of 5 numbers 1-39

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?

This can't be encoded into 16 bits. The number of such hands is ${39 \choose 5} = 575757$ (is that a pretty number or what?), and $\lg(575757) \approx 19.1$, so a 5-card hand be encoded into 20 bits, but it can't be encoded in 16 bits.