Feeling a combination of annoyed and accomplished right now because I finally thought of the perfect solution to a math problem I encountered five years ago.
The problem is, using N coin flips, what's the optimal way to simulate the greatest amount of fair die rolls?
I looked for ways to assign combinations 1-6, then look for orthogonal superstructures of those results, and so on, and so on, but never got close to the theoretical max efficiency of log(2)6 coin flips per die roll.
It just hit me randomly out of nowhere today. Express the coin flips as a binary number starting after the decimal point. In other words, Heads, Heads, Tails, Heads, Tails = .00101...
Then just transform this binary number into a hexal number, and those are your die rolls. Any digit that can't be changed by any future possible coin flip is a fair result. So if your number is expressed in hexal as .44512003, then just add 1 and your die rolls are 5, 5, 6, 2, 3, 1, 1, 4. This solution gets you the absolute maximum theoretical efficiency.
I'm happy I finally got it, but mad it took me five years.