Can you just index your inner counters as b = a+1,limit and c=b+1,limit? That would ensure that you would never repeat a triple with b or c less than a, c less than b or a, etc. I programmed it up (in ...