I have to decide if the following language is regular or not.

I suspect it is not regular, so I try using pumping lemma to prove it, but something goes wrong. Any help on how to use pumping lemma on this language would be appreciated:

$$\{{a^{n^2+2n}|n\ge 0}\}$$

I assume the language is regular.

I assume p is the pumping length.

I use the word ${a^{p^2+2p}}$ which is equal to ${a^{p^2}*a^{2p}}$

But after that i don't know how to end up in a contradiction to prove that it is not regular.

  • $\begingroup$ What is that goes wrong? It would help a lot if you clarify where you're stuck. $\endgroup$ – Discrete lizard Feb 25 '18 at 14:31
  • $\begingroup$ Your language isn't regular. This can be proved using the pumping lemma. $\endgroup$ – Yuval Filmus Feb 25 '18 at 14:37
  • $\begingroup$ i updated the question to show exactly what my problem is when i use the pumping lemma. Thanks for the fast responses. $\endgroup$ – Loukia Feb 25 '18 at 14:39