Whilst out jogging this morning, I realised that the algorithm I gave yesterday made no provision for a decrease in the factorial index. As far as I can see, the following should make up for that: In swapping AB, then i if A=>B, we have B+1.A else B.A-1 I hope that this is correct, now. Robin.