$\begingroup$

I don't where it is from therefore if it is against the rules sorry for posting it. I tried using primes however I am stuck. I would appreciate any help.

A positive integer $n$ with $n\ge3$ is called a Nella number if there exists a positive integer $x$ with $x<n$ and there exists a positive integer $m$ such that

$m$ is not divisible by $x$ or by $x+1$, and

$m$ is divisible by every other positive integer between $1$ and n inclusive.

For example, $n=7$ is a Nella number.

How many Nella numbers $n$ are there with $50\le n\le 2017$?