Definition: Let $f$ be a smooth function defined on a neighborhood of some $t_0 \in \mathbb{R}$. Then for each integer $k \geq 0$, we say $f$ has an $A_k$ singularity at $t_0$ iff $\forall p, \, 1 \leq p \leq k$, $f^{(p)}(t_0) = 0$ and $f^{(k+1)}(t_0) \neq 0$.
Now, let's say $g$ is a mapping from a finite set $S = \{ s_1, \dots s_n \}$ of real numbers to $\mathbb{R}$. Is there a good way to discretize the concept of an $A_k$ singularity at some $s_i \in S$? You can think of $g$ as some function obtained from evaluating $f$ at a discrete set of points "around" a $t_0$ in which there's an $A_k$ singularity. But you don't have the $f$, only $g$ and you want to recover the value of $k$.
I thought of using the idea of changing signs i.e. saying that if $g(s_i)-g(s_{i-1})$ and $g(s_{i+1})-g(s_i)$ have different signs, then it makes sense to say that $g'(s_i) = 0$ (and the first nonzero derivative has even order) at that point.
Also, if $g(s_i)-x$ and $g(s_{i+1})-x$ have different signs, it makes sense to say that somewhere between them $g$ went through the value $x$. (Although this doesn't relate to $A_k$ singularities, the idea of change of signs may be useful).
So lets say we have $f(x)=3x^2+5x^7$ and we're observing the neighborhood of $x=0$. $f$ has an $A_1$ singularity at $x=0$. If we pick some points around it and create the function $g$, we will see that there will probably be a point in which $g(s_i)-g(s_{i-1})$ and $g(s_{i+1}) - g(s_i)$ have distinct signs. If we do the same for $f(x)=3x^4+5x^7$, the same thing will happen. But now,$f$ has an $A_3$ singularity at $x=0$. So,how to differentiate between them? Also, if $f(x)=3x^5+8x^8$, the change of sign won't even happen in the differences of consecutive $g$'s although we have an $A_4$ singularity.
So how do I detect an $A_k$ singularity when $g$ is given? Is there an elegant way to do that?