Total number of permutations, $P$ = $Z+O\choose Z$.{select the positions for Z Zeroes, positions of One's will get automatically fixed}.
Let $X$ denote the permutaion where all One's are separated by at-least $N+1$ Zeroes. Required answer is $P-X$.
Let $x_i$ denote the number of Zeroes between $i$-th and $i+1$-th $1$, $1\le i\le O-1$. And $x_0$ define number of zeroes before the first one and $x_O $ denote the number of zeroes after the last one. Then by multinomial theorem, $X$ is the number of solutions to the following equation,
$$\sum_{i=0}^O x_i = Z , \ x_0\ge 0,x_O\ge 0 \text{ and remaining } x_i \ge N+1. $$ $$\implies \sum_{i=0}^O x_i = Z-(O-1)(N+1) , \ x_i \ge 0$$
Thus, $X = {Z-((O-1)(N+1)) + O+1 -1 \choose (O+1-1)}$.