For an invertible $n\times n$ matrix $M$ with integer entries we define a sequence $\mathcal{S}_M=\{M_i\}_{i=0}^{\infty}$ by the recurrence $M_0=M$ ,$M_{i+1}=(M_i^T)^{-1}M_i$ for $i\geq 0$.

Find the smallest integer $n\geq 2 $  for wich there exists a normal $n\times n$ matrix with integer entries such that its sequence $\mathcal{S}_M$ is not constant and has period $P=7$ i.e $M_{i+7}=M_i$.
($M^T$ means the transpose of a matrix $M$ . A square matrix is called normal if $M^T M=M M^T$ holds).

[i]Proposed by Martin Niepel (Comenius University, Bratislava)..[/i]
1. **Define the sequence and initial conditions:**
   Given an invertible \( n \times n \) matrix \( M \) with integer entries, we define the sequence \( \mathcal{S}_M = \{M_i\}_{i=0}^{\infty} \) by the recurrence relation:
   \[
   M_0 = M, \quad M_{i+1} = (M_i^T)^{-1} M_i \quad \text{for} \ i \geq 0.
   \]

2. **Calculate the first few terms of the sequence:**
   \[
   M_1 = (M_0^T)^{-1} M_0 = (M^T)^{-1} M.
   \]
   \[
   M_2 = (M_1^T)^{-1} M_1 = ([(M^T)^{-1} M]^T)^{-1} (M^T)^{-1} M = (M^T)^{-1} (M^T)^{-1} M = (M^T)^{-2} M^2.
   \]

3. **Inductive step:**
   Assume \( M_i = (M^T)^{-2^{i-1}} M^{2^{i-1}} \) holds for some \( i \geq 1 \). Then,
   \[
   M_{i+1} = (M_i^T)^{-1} M_i = ([(M^T)^{-2^{i-1}} M^{2^{i-1}}]^T)^{-1} (M^T)^{-2^{i-1}} M^{2^{i-1}}.
   \]
   Since \( (AB)^T = B^T A^T \),
   \[
   M_i^T = (M^{2^{i-1}})^T ((M^T)^{-2^{i-1}})^T = (M^T)^{2^{i-1}} (M^{-2^{i-1}}).
   \]
   Therefore,
   \[
   (M_i^T)^{-1} = (M^{-2^{i-1}})^{-1} ((M^T)^{2^{i-1}})^{-1} = M^{2^{i-1}} (M^T)^{-2^{i-1}}.
   \]
   Thus,
   \[
   M_{i+1} = M^{2^{i-1}} (M^T)^{-2^{i-1}} (M^T)^{-2^{i-1}} M^{2^{i-1}} = (M^T)^{-2^i} M^{2^i}.
   \]
   By induction, \( M_i = (M^T)^{-2^{i-1}} M^{2^{i-1}} \) holds for all \( i \geq 1 \).

4. **Periodicity condition:**
   We need \( M_7 = M \), which implies:
   \[
   (M^T)^{-64} M^{64} = M.
   \]
   This simplifies to:
   \[
   M^{63} = (M^T)^{64}.
   \]
   Taking the transpose of both sides, we get:
   \[
   (M^{63})^T = ((M^T)^{64})^T \implies (M^T)^{63} = M^{64}.
   \]
   Combining both equations, we have:
   \[
   M^{63} = (M^T)^{64} \quad \text{and} \quad M^{64} = (M^T)^{63}.
   \]
   These imply that \( M = (M^T)^{-1} \), meaning \( M \) is an orthogonal matrix.

5. **Orthogonal matrix with integer entries:**
   Since \( M \) is orthogonal and has integer entries, it must be a permutation matrix. For \( M_7 = M \), we need:
   \[
   M^{128} = M \implies M^{127} = I.
   \]
   Since \( 127 \) is a prime number, the permutation described by \( M \) must have a cycle of length \( 127 \). This is only possible if \( n \geq 127 \).

6. **Conclusion:**
   The smallest integer \( n \geq 2 \) for which there exists a normal \( n \times n \) matrix with integer entries such that its sequence \( \mathcal{S}_M \) is not constant and has period \( P = 7 \) is \( n = 127 \).

The final answer is \( \boxed{127} \).