If you need to get index by given combination (in context of combinations with repetition), please read my latest article published here on my github pages blog: https://vgrankin.github.io/data-science/pascals-triangle/ where I demonstrate how to get index of given combination using Pascal’s triangle!
Btw we invent Pascal’s triangle from scratch along the way, so for those who are interested in how to actually create Pascal’s triangle it will be a very interesting read!
Cheers & GL with data science! 🙂