I do controls, and sometimes I want to monitor more dry contacts than I have digital inputs for. I'm cheap, and don't want to pay for more points, so sometimes I'll put some resistors in parallel with the contacts, and put the (resistor||contact) pairs in series, and read them using an RTD input. With three contacts, it's easy to pick three resistor values that give me 8 unique combinations within a comfortable range and with comfortable distance in between. Say 10k, 7.5k, and 15k. Moving on up to six contacts, I've now got 64 states, and picking 6 resistances from the E12 series that can satisfy 64 states may not even be possible.
Is there a succinct way to solve this problem of picking x resistances from a standard series, sticking within one decade? Something I can stick into Excel? Maybe it's very obvious once I restate the problem mathematically in terms of sets or combinatorics, but I worked hard in those classes once so I'd never have to do it again.
Electrically there are obviously many ways to convert a six bit digital value to an analog value, including using resistors and more decades, but anything more complex than single resistors pretty much moves me into "buying a pre-built" solution territory.