
COMMENTS

Increasing modular 3sequences are of the following form: i,i+1,i+2, where arithmetic is modulo n, while correspondingly decreasing modular 3sequences are of the form i,i1,i2, where arithmetic is modulo n.


EXAMPLE

For n=4 there are a(4)=16 solutions, thus there are 4!a(4)=8 permutations of length 4 with increasing or decreasing modular 3sequences. These are the permutations (0,1,2,3), (0,3,2,1), (1,2,3,0), (1,0,3,2), (2,3,0,1), (2,1,0,3), (3,0,1,2), and (3,2,1,0).
