  Inspired by some iterative algorithms useful for proving the real analyticity
(or the Gevrey regularity) of a solution of a linear partial differential
equation with real-analytic coefficients, we consider the following question.
Given a smooth function defined on $[a,b]\subset\mathbb{R}$ and given an
increasing divergent sequence $d_n$ of positive integers such that the
derivative of order $d_n$ of $f$ has a growth of the type $M_{d_n}$, when can
we deduce that $f$ is a function in the Denjoy-Carleman class $C^M([a,b])$? We
provide a positive result, and we show that a suitable condition on the gaps
between the terms of the sequence $d_n$ is needed.
