https://1library.net/document/y802lv4q-minimal-weight-colexicographically-minimal-integer-representations.html