What's the purpose of ``mod1(int(ceil(ind / cprod[i-1])),cprod[i-1])``?