Proving that $L = \{0^k \mid \text{$k$ is composite}\}$ is not regular by pumping lemma 
Suppose $L = \{0^k \mid \text{$k$ is composite}\}$. Prove that this language is not regular.

What bugs me in this lemma is that when I choose a string in $L$ and try to consider all cases of dividing it into three parts so that in each case it violates lemma, I always find one case that does not violate it. A bit of help will be appreciated.
Thanks in advance.

My attempt:


*

*Suppose that $L$ is regular.

*Choosing string $x = 0^{2k}$ where $k$ is prime ($2k$ pumping constant)

*We can divide $x$ into three parts $u, v, w$ such that:
$$|uv| \le 2k \qquad |v| > 0\qquad uv^iw \in L \text{ for $i \ge 0$}$$

*If $u$ and $w$ are empty, all conditions are met.
It is the same when I change $2$ for any other number. Maybe I'm choosing wrong.

Albeit mathematical overkill, here is one way to use the pumping lemma directly to prove the result.
Suppose $L$ is regular; then, let the pumping length be $n \geq 1$. By the infinitude of primes, let $p$ be an odd prime greater than $n$. Consider the string $0^{p^2} \in L$. Since $|0^{p^2}| = p^2 > p > n$, by the pumping lemma, there exists a decomposition $0^{p^2} = uvw$ where $|uv| \leq n$, $|v| > 0$, and $uv^kw \in L$ for all $k \geq 0$.
Note the inequality $0 < |v| \leq |uv| \leq n < p$; in particular, $0 < |v| < p$, which implies $\gcd(|v|, p) = 1$ via the primality of $p$. This further implies that $\gcd(|v|,p^2) = \gcd(|v|, p^2 - |v|) = 1$.
Now note that $uv^kw = 0^{p^2 + (k - 1)|v|}$, so that the lengths of the strings generated by pumping is precisely an arithmetic progression with $p^2 - |v|$ as the initial term, and $|v|$ as the common difference. As we have shown that $\gcd(p^2 - |v|, |v|) = 1$, Dirichlet's theorem on arithmetic progressions states that this arithmetic progression contains infinitely many primes; thus, there exists $k' \geq 0$ such that $p^2 - |v| + k'|v| = p^2 + (k' - 1)|v|$ is prime. As $0^{p^2 + (k' - 1)|v|} = uv^{k'}w \in L$, we have a contradiction.
