I am currently learning the pumping lemma, and encountered the following question, which I am unable to solve:
Prove that $L = \{ 0^n \mid \text{$n$ is power of 2}\}$ is not regular.
I considered $w = 0^{2^n}$, where $n$ is the pumping lemma constant. Then I divided $w$ into $xyz$, where $y \ne \epsilon$ and $|xy| \leq n$. Hence, $|y|$ will be between 1 and $n$. So, $|xy^kz|$ satisfies $L$ if $|y| = 2$ for all values of $k$ and it is within the bound. So, how is $L$ irregular?
The question is to prove it is irregular but here it is coming as regular.