In any case, you don’t need to index the whole numbers space to transmit all the information
Like you say, you can use 13 bits instead of 15
And using variable length encoding you can reduce it even more
But what is the distribution in this case?
Why do you need to know more about the file to transform to frequency domain?
There is a lot of research in this field because of the IoT fad/trend. If you want to know more i would suggest to simply pic a paper from IEEE and deep dive into the terms and terminology and simply skip the proofs of most algorithms/theorems.
Your inefficiency is just the rounding error, which quickly becomes trivial. In theory some block sizes should even coincidentally be close to a whole number of bits.
Even if 720 were the right number, that takes 10 bits, not 8.
Still 10 is less than 15
Additionally, as someone else pointed out, it would be 6^5 sequences, which would need 13 bits
Still 13 is less than 15
But the interesting thing is, you can then index the most commonly used sequences of sequences and compress by a few more bits
You can keep the process going until you have a 2 bit index for the most commonly used sequences (of sequences (of sequences… ))
But there’s an alternative way, instead of each number individually, you can code the sequences of 5 numbers, which there are 65432 of in this case, 6!/1! = 720, which can be encoded in binary with 8 bits
So instead of 15 bits, you can use 8