Solution (source code)

= Solution

Let $\alpha=\inf_{r\geq1}a_r/r$. The inequality $a_n/n\geq\alpha$ gives $\liminf_na_n/n\geq\alpha$. Fix $r$ and write $n=qr+s$, where $0\leq s<r$. Repeated subadditivity gives $a_n\leq qa_r+a_s$ when $s>0$, with the evident omission when $s=0$. Since the finitely many remainders $a_s$ are bounded,
$$
\limsup_{n\to\infty}\frac{a_n}{n}\leq\frac{a_r}{r}.
$$
Taking the infimum over $r$ proves the <Fekete lemma>:
$$
\boxed{\lim_{n\to\infty}\frac{a_n}{n}=\inf_{r\geq1}\frac{a_r}{r}}.
$$