Using pumping lemma show that language $L = \{a^{n^2} | n≥ 0\}$ is not regular.
Is this approach correct?
Let's assume that $L$ is regular so then the pumping lemma applies.
Let $w = a^{n^2} ∈ L$.
We can split $w$ into $w = xyz$ such that $|y| > 0 ,\ |xy| ≤ z$,$\ \forall i ≥ 0: xy^iz ∈ L$
$$|w|=n^2 ≥ n$$
Let $x,y,z$ be:
$$\begin{split} x& = λ\\ y &= a^k, k > 0, k ≤ n\\ z &= a^{n^2-k}\\ \end{split}$$
If $i = 2$,$\ w^* = xyyz ∈ L$, $\ w^*=a^{n^2+k}$, because $1≤k≤n$ then:
$$n^2<n^2+k<(n+1)^2 \implies n^2<|xy^2z|<(n+1)^2 \implies xy^2z ∉ L$$
That is a contradiction with the pumping lemma so $L$ is not a regular language.