Let $A=\{1,2,3,\cdots ,17\}$. A mapping $f:A\rightarrow A$ is defined as follows: $f^{[1]}(x)=f(x), f^{[k+1]}(x)=f(f^{[k]}(x))$ for $k\in\mathbb{N}$. Suppose that $f$ is bijective and that there exists a natural number $M$ such that: i) when $m<M$ and $1\le i\le 16$, we have $f^{[m]}(i+1)- f^{[m]}(i) \not=\pm 1\pmod{17}$ and $f^{[m]}(1)- f^{[m]}(17) \not=\pm 1\pmod{17}$; ii) when $1\le i\le 16$, we have $f^{[M]}(i+1)- f^{[M]}(i)=\pm 1 \pmod{17}$ and $f^{[M]}(1)- f^{[M]}(17)=\pm 1\pmod{17}$. Find the maximal value of $M$.
Problem
Source: Chinese Mathematical Olympiad 1997 Problem 5
Tags: modular arithmetic, number theory unsolved, number theory