Unary context-free language is regular (source code)

= Unary context-free language is regular

Every <context-free language> over a one-symbol alphabet is a <regular language>. Equivalently, the set of word lengths of a unary context-free language is ultimately periodic. This follows, for example, from the one-dimensional case of Parikh's theorem.