Let $L$ a language over $X = \{a\}$ defined as follow :
$$L = \{ a^{n!} \ | \ n \geq 0 \}$$
I want to prove that $L$ isn't regular, I have searched in the forum for an equivalent question, but I found nothing. If it's a duplicate, I apologize and I'll be glad if you provide me the link of the duplicated question.
I'll show here what I have done, using the pumping lemma.
Suppose that $L$ is regular, let $n \in \mathbb{N}^*$ and $\omega = a^{n!}$. We have $\omega \in L$ and $|\omega| \geq n$. Thus, there exist $x, y, z \in X$ so as :
- $a^{n!} = xyz$
- $y \neq \epsilon$
- $|xy| \leq n$
- $xy^kz \in L, \quad \forall k \geq 0$
Because of fact 3, $xy = a^k$ and $y = a^j$ with $k \leq n$ and $1 \leq j \leq n$. Thus :
$$a^{n!} = a^{k - j}.a^{j}.a^{n! - k}$$
By fact 4, we must have $a^{k - j}.a^{n! - k} = a^{n! - j} \in L$.
In addition, because $1 \leq j \leq n$, the following is true :
$$n! - n \leq n! - j \lneq n!$$
The final result that I need is that $(n - 1)! \lneq n! - n$. Using this I can deduce :
$$(n - 1)! \lneq n! - j \lneq n!$$
Showing that $n! - j$ can't be the factorial of an integer, giving the contradiction $a^{n! - j} \notin L$. I have tried to prove the final result, but I didn't succeed. It is not true for the first values of $n$, I have tried to consider multiple cases but went for nothing.
So I ask for your advice, maybe I am going wrong and didn't applied the pumping lemma with a word that leads to contradiction.