Is the language of all $a^n$ for which $n$ has an even number of digits in 10-base system regular?
A slightly simpler way is to say that if you consider a string $x\in
L$ of size $p$, then there is a non-empty substring $v$ of $x$ that
you can pump without getting out of the language, if it is
regular. Then you can pump it in $x$ until it exceeds a size
$10^{2m}$, which has to be greater than $p$, such that
$10^{2m+1}-10^{2m} &gt; |v|$. And you necessarily get the wrong number of digits.

In other words, you try to find in the sequence of possible sizes a gap
that is too wide to be jumped by pumping a constant pumping
size $|v|$.

This very simple reasonning also works with the context-free pumping
lemma.

Wide gaps, that cannot be pumped exist as soon as empty gaps can
increase in size beyond any bound. This depends on the definition of
the language.

But using the pumping lemma is often a bit more sophisticated.