If n is odd, Tn-1=1+...+n-1 mod n=0, so clearly no solution can exist.
If n is even, the following permutation can easily be shown to provide a solution:
Si=(-1)ii mod n
Back to riddle
Back to main page