you can use heptal number system for this

for example, if you want to find the index of [4,4,6,6],

since there is no 0 used we consider 1 as 0, 2 as 1 likewise, which eventually make us to take above array as

3355(reduce 1 from every digit)

this is expressed in heptal number system(since 0 to 6 is used). So convert it to decimal number system to find the index

since first index ([1,1,1,1] or after adjusting 0000) is named - 1, add 1 to the final result (ie 1217)

check out my work i think this works