Taking your example, [(z*65536)+(y*256)+x]=index number=18921 we notice that the LHS leaves remainder x on division by 256. So x is the remainder of 18921 on division by 256, that is, 233. So z*65536 + y*256 + 233 = 18921, that is, z*65536 + y*256 = 18688 = 73*256. So z*256 + y = 73. The LHS leaves remainder y on division by 256, so y = 73. We now have z*256+73 = 73, giving z=0.