Shouldn't numbers be naturals?
If so, it is similar with Kvant M2377 (which was for 25 numbers).
The answer is 5.
Example: 1, 2, 1, 4, 1, 6, 1, 10, 1. It is clearly works.
Note that there is no two even numbers in a row (by mod 2). So, since 9 is odd, there is two odd numbers in a row (adjacent). They are clearly both 1. If there are more then 4 numbers more than 1, there is 2 adjacent numbers, both more than 1. Clearly, we can find these numbers such a 1 was before them, i.e. they were $1,a,b,c$ with $a,b>1$. We have $1+a^b$ is prime, so $a$ is even. Since $a+b^c$ is prime, we have $b$ is odd. But in this case $a+1|1+a^b$ and $a+1<1+a^b$, so $1+a^b$ can't be prime. A contradiction!