I'm having trouble using the pumping lemma to prove this language $L := \{a^n\mid\exists k \geq 0\ n = k^3\}$ is not regular.
- Assume $L$ is regular. Thus there is a DFA $M$ for it.
- Choose $m$ as the number of states in a DFA $M$.
- Choose $w = a^m$ such that $|w| \geq m$.
- Decompose $w = xyz$ such that $|xy| \leq 1$ and $|y| \geq 1$. Let $y = a^p$ where $p \geq 1$.
- Select an $i$ for $w_i = xy^iz$. Try $i = 0$. Result is $a^{m-p}$.
Here's where I'm stuck.
Hint. (1) State the pumping lemma for regular languages properly and be sure to understand it.
(2) Your step 5 is asking to find an $i$ such that $w_i = xy^iz \notin L$. You cannot just take a random $i$ and hope it will work.