Let $m>1$ be a natural number and $N=m^{2017}+1$. On a blackboard, left to right, are written the following numbers:
\[N, N-m, N-2m,\dots, 2m+1,m+1, 1.\]
On each move, we erase the most left number, written on the board, and all its divisors (if any). This procces continues till all numbers are deleted. 
Which numbers will be deleted on the last move.
1. **Claim**: The last number to be deleted is \( X = \frac{m^{2017} + 1}{m + 1} + m \).

2. **Proof of Claim**:
   - **Thing 1**: \( X \) doesn't get deleted as the divisor of some other bigger number (which would be to its left).
     - All numbers on the board are \( 1 \pmod{m} \), and so is \( X \).
     - If \( X \) is a divisor of a bigger number \( Z \) which causes it to get annihilated beforehand, we must have:
       \[
       Z \equiv 1 \pmod{m} \implies \frac{Z}{X} \equiv 1 \pmod{m} \implies \frac{Z}{X} \ge m + 1 \implies Z \ge (m + 1)X > (m + 1) \cdot \frac{m^{2017} + 1}{m + 1} = m^{2017} + 1.
       \]
       This is absurd. So \( Z \) can't actually exist, like we said before. \(\blacksquare\)

   - **Thing 2**: All numbers to the right of \( X \) get deleted before we eventually come to \( X \).
     - Let \( A \) be a number to the left of \( X \); of course, \( A \le X - m = \frac{m^{2017} + 1}{m + 1} \).
     - Then \( B = A \cdot (m + 1) \) is at most \( m^{2017} + 1 \) and also \( 1 \pmod{m} \), so \( B \) occurs somewhere in the list we had to begin with.
     - But then \( A \) should've got deleted as a divisor of \( B \) earlier, as we claimed. \(\blacksquare\)

3. **Ensuring \( X \) is the only number to get deleted in the last step**:
   - Suppose \( Y \) is a divisor of \( X \) that gets deleted alongside \( X \) at the last step.
   - Consider \( S = X + Ym \); it's also a multiple of \( Y \), and it occurs in the initial list because \( S \equiv 1 \pmod{m} \) and \( S \le m^{2017} + 1 \).
   - We need \( X + Ym \le (X - m)(m + 1) \iff Y \le X - m^2 - m \), but we have \( Y \le \frac{X}{m + 1} \).
   - So it's enough to show that:
     \[
     \frac{X}{m + 1} \le X - m^2 - m \iff X \ge m^2 + 2m + 1 \iff m^{2017} \ge m^3 + 2m^2 + 2m.
     \]
     The last inequality is easy to establish via induction on \( m \) for \( m \ge 2 \). \(\blacksquare\)

The final answer is \( \boxed{ X = \frac{m^{2017} + 1}{m + 1} + m } \).