What is the maximum number of consecutive composite numbers possible?
Solution 1:
Let $p_1,p_2, p_3,\dots,p_n$ be the first $n$ primes, and let $P_n$ be their product. Then the $p_{n+1}-2$ consecutive integers $P_n+2,P_n+3, \cdots, P_n+(p_{n+1}-1)$ are all composite.
For let $P_n+x$ be one of these numbers. Since $2\le x\lt p_{n+1}$, $x$ is divisible by some prime $p\le p_n$ ($x$ could itself be prime). But $P_n$ is also divisible by $p$, so $P_n+x$ is divisible by $p$. Clearly $P_n+x\gt p$, so $P_n+x$ is composite.
We can in general get a very slightly cheaper string by starting at $P_n-2$ and going backwards. These procedures get us arbitrarily long strings of consecutive composites, since there are infinitely many primes.
But one can do a lot better than $P_n$ in general. The subject of Prime Gaps has been extensively studied. You will find detailed information in this Wikipedia article.
Solution 2:
The Answer for your first question is - Yes, It is possible to have N consecutive composite numbers. The series -
$(N+2)!+2 , (N+2)! + 3,(N+2)!+4,...(N+2)!+(N+2)$
will give you N consecutive composite numbers.
Proof - It is easy to prove it because, N! is a multiplication of all numbers from 1 to N, so you can see
$(N+2)!+2$ will give you 2 as common factor
$(N+2)!+3$ will give you 3 as common factor
.
.
.
$(N+2)!+(N+2)$ will give you (N+2) as common factor
showing N consecutive composite numbers.