# Can't tell whether the following language is regular or not: [duplicate]

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.

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