Given the language $$L = \big\{ 0^{m} 1 0^{2m+k} \mid m \text{ prime and } k \ge 1 \big\} $$ show that $L$ is not context free by giving a counterexample of the context free pumping lemma. It may be userful the pumping lemma of the language of prime numbers, you can find it here.
A counterexample must be a string $z \in L$ whose length $|z|$ is greater than a generic h such that for any the decompositions $uvwxy=z$ with $|v|+|x|\ge 1$ and $|vwx|<h$ exists an i such that $uv^iwx^iy \not\in L$. Generally we have to find a contraddiction of $|v|+|x|\ge 1$ or $|vwx|<h$.
There are five possible decompositions of the string. The only required case is the one with $v$ completely in the first part of the string and $x$ completely in the second part.
Now follows some failed attempts:
This one was posted as answer I deleted because incorrect. I took as string $z = 0^{2h}10^{5h}$ which is in the language for $m = 2h$ and $k = h$. The problem here is that $m$ is prime, so $m = 2h \iff h = 1$ which means $h$ is not a generic length anymore. Here it follows the incorrect attempt:
$$ uv^iwx^iy = 0^{2h + |v|(i-1)} 1 0^{5h + |x|(i-1)} = 0^{m} 1 0^{2m+k} \in L $$ The equation has solution iff has solution the system $$ \begin{cases} 2h + |v|(i-1) = m, m \text{ prime} \\ 5h + |x|(i-1) = 2m + k \\ \end{cases} $$ For $i = h + 1$ we have $$ 2h + h|v| = h(|v| + 2) = m $$ But $m$ cannot be prime because it's a moltiplication of two terms $h$ and $(|v| + 2)$. Contraddiction!
We need to choose $m$ as something like $h$ or $ah + b$ in order to avoid this issue.
I took as string $z = 0^h 1 0^{2h+1}$ which is in the language for $m = h, k = 1$. We have $$ uv^iwx^iy = 0^{h+|v|(i-1)} 1 0^{2h + 1 + |x|(i-1)} $$ We have to solve the system $$ \begin{cases} h + |v|(i-1) = m, m \text{ prime} \\ 2h + 1 + |x|(i-1) = 2m + k\end{cases} $$
Trying with $i = h + 1$ does not work: the first equation becomes
$$ h + h|v| = h(1 + |v|) = m \text{ prime} \iff |v| = 0$$ so the second equation results in $$ 2h + 1 + h|x| = 2h + k \Rightarrow |x| = \frac{k-1}{h} $$ so the string results in $0^{m} 1 0^{2m+k} \in L$ with $m = h$, $k = h + 1$ from the decomposition with $$ |v| = 0 \qquad |x| = \frac{(h+1) - 1}{h} = 1$$
Trying with $i = 0$ leads to
$$ \begin{cases} h - |v| = m \\ 2h + 1 - |x| = 2m + k \end{cases}$$ which results in \begin{align*} 2h + 1 - |x| &= 2h - 2|v| + k \\ 2|v| - |x| &= k - 1 \end{align*} which results in as many string $\in L$ as you want (for example $k = 3, |x| = 0, |v| = 1$ gives $0^{h-|v|} 1 0^{2h-2|v|+1} = 0^{h-1} 1 0^{2h-1} \in L$)
I took the string $z = 0^{h} 1 0^{3h}$ which is in the language for $m = h, k = h$. We have $$ uv^iwx^iy = 0^{h+|v|(i-1)} 1 0^{3h + |x|(i-1)} $$ We have to solve the system $$ \begin{cases} h + |v|(i-1) = m, m \text{ prime} \\ 3h + |x|(i-1) = 2m + k\end{cases} $$
- Trying with $i = h + 1$ we have
$$ h = m \qquad |v| = 0 \qquad 3h + h|x| = 2h + k$$ which results in $ |x| = \frac{k}{h} - 1$; then we can take $k = 3h$ so $|x| = 2$, and the result is the string $0^{h} 1 0^{4h} \in L$
- Trying with $i = h + 1$ we have
As you can see, I can't find a combination of string and $i$ that generates a contraddiction. How would you proceed?