Find all natural numbers $ k\ge 1 $ and $ n\ge 2, $ which have the property that there exist two matrices $ A,B\in M_n\left(\mathbb{Z}\right) $ such that $ A^3=O_n $ and $ A^kB +BA=I_n. $
To solve the problem, we need to find all natural numbers \( k \ge 1 \) and \( n \ge 2 \) such that there exist two matrices \( A, B \in M_n(\mathbb{Z}) \) satisfying \( A^3 = O_n \) and \( A^k B + BA = I_n \).

1. **Case \( k \ge 3 \):**
   - If \( k \ge 3 \), then \( A^k = O_n \) because \( A^3 = O_n \).
   - The equation \( A^k B + BA = I_n \) simplifies to \( O_n B + BA = I_n \), which implies \( BA = I_n \).
   - However, \( A \) is singular (since \( A^3 = O_n \)), and thus \( BA = I_n \) is impossible because \( A \) cannot have an inverse.
   - Therefore, \( k \ge 3 \) is not possible.

2. **Case \( k = 2 \):**
   - If \( k = 2 \), then the equation becomes \( A^2 B + BA = I_n \).
   - Multiplying both sides by \( A \) from the left, we get \( A^3 B + ABA = A \), which simplifies to \( O_n B + ABA = A \), hence \( ABA = A \).
   - Multiplying both sides by \( A \) from the right, we get \( A^2 BA^2 = A^2 \), which simplifies to \( O_n = A^2 \).
   - This implies \( A^2 = O_n \), and substituting back, we get \( O_n B + BA = I_n \), hence \( BA = I_n \), which is again impossible because \( A \) is singular.
   - Therefore, \( k = 2 \) is not possible.

3. **Case \( k = 1 \):**
   - If \( k = 1 \), then the equation becomes \( AB + BA = I_n \).
   - We need to find matrices \( A \) and \( B \) such that \( A^3 = O_n \) and \( AB + BA = I_n \).
   - From \( A^3 = O_n \), we know that \( A \) is nilpotent of index 3.
   - By conjugation, we can assume \( A \) is in Jordan Normal Form (JNF). Since \( A \) is nilpotent, its JNF consists of Jordan blocks with eigenvalue 0.
   - The possible Jordan blocks for \( A \) are \( \begin{pmatrix} 0 & 1 \\ 0 & 0 \end{pmatrix} \) and \( (0) \).

4. **Analyzing the Jordan blocks:**
   - Suppose \( A \) has a Jordan block \( (0) \). Then \( A \) has a zero row, implying \( A e_n = 0 \) for some basis vector \( e_n \).
   - Since \( AB(e_n) + BA(e_n) = e_n \), we get \( AB(e_n) = e_n \), which is a contradiction because \( A e_n = 0 \).
   - Therefore, \( A \) cannot have any Jordan block \( (0) \), and \( A \) must be a direct sum of blocks \( \begin{pmatrix} 0 & 1 \\ 0 & 0 \end{pmatrix} \).

5. **Constructing \( B \):**
   - If \( A \) is a direct sum of \( \begin{pmatrix} 0 & 1 \\ 0 & 0 \end{pmatrix} \), then \( n \) must be even.
   - For each Jordan block \( \begin{pmatrix} 0 & 1 \\ 0 & 0 \end{pmatrix} \), we can find \( B \) such that \( AB + BA = I \).
   - For example, if \( A = \begin{pmatrix} 0 & 1 \\ 0 & 0 \end{pmatrix} \), then \( B = \begin{pmatrix} 0 & 0 \\ 1 & 0 \end{pmatrix} \) satisfies \( AB + BA = I \).

Therefore, the solution is \( k = 1 \) and \( n \) must be even.

The final answer is \( \boxed{ k = 1 } \) and \( n \) even.