Let $N$ and $M$ be two integers with $M\ge N\ge2$.
There is a list of altogether $M$ statements that is divided into three parts: the first part consists only of the first statement; the second part consists of the $N-1$ statements with numbers from $2$ up to $N$; the third (possibly empty) part consists of the remaining statements with numbers from $N+1$ up to $M$.
The first part of the list declares:
Statement 1: Not all the statements on this list are false.
The statement with number $n$ with $2\le n\le N$ in the second part says:
Statement n: All statements with a number divisible by $n$ are false.
The statement with number $k$ with $N+1\le k\le M$ in the third part may be arbitrary.
Statement k: (Contents is left to the choice of the puzzle solver.)
Determine (in dependence on $N$) the minimum value of $M$ for which this system of statements does not yield a paradox.