EDIT: What is written below doesn't actually answer the original question because the resulting functions $a_i(c)$ are not continuous. I will leave it posted for now because it does suffice to illustrate that the claim can fail without continuity of the $a_i$.


This "converse" is false, as I learned from Fedor Petrov's contribution to MathOverflow's list of common false beliefs in math (perhaps one of the best questions ever asked on that site). In an embarrassed email to Prof. Petrov I admitted to holding this belief, so he provided me with the counterexample \[ f(x) = \begin{cases} \sin (e^{1/x^4}) e^{-1/x^2} & x\neq 0, \\\ 0 & x=0. \end{cases} \] This function is $C^\infty$ everywhere except at $x=0$. It goes to zero very quickly as $x\to 0$, but within that $e^{-1/x^2}$ envelope it wiggles faster than it goes to zero. The result is that $f(x) = o(x^n)$ for all $n$ as $x\to 0$, but a quick computation shows that $f'(x)$ is not continuous at zero. So $f$ is differentiable, but not even $C^1$.