$f\left(\frac{1}n\right)=\frac{n^2}{n^2+1}$ Let $f:\mathbb{R}\rightarrow\mathbb{R}$ of class $C^\infty$
$\forall n\in\mathbb{N}^*,f\left(\frac{1}n\right)=\frac{n^2}{n^2+1}$
Let $p\in\mathbb{N}^*$
What is the value of $f^{(p)}(0)$ ? (by $f^{(p)}$ i mean the $p$th derivative of $f$)

I have no clue how to do that. Any help is appreciated.
Thank you.
 A: If $p=1$ you can calculate $f'(0)$ as
$$
lim_{n\rightarrow\infty}\frac{f(1/(n+1))-f(1/n)}{1/(n+1)-1/n}=0.
$$
For general $p$ you can use the $k$-th Taylor polynomial
$$
f(1/n)=1 + \frac{1}{2\cdot n^2}f^{(2)}(0)+\frac{1}{3!\cdot n^3}f^{(3)}(0)+\ldots+\frac{1}{k!\cdot n^k}f^{(k)}(0)+O(\frac{1}{n^{k+1}}).
$$
Substracting $1$ on both sides
$$
-\frac{1}{n^2+1}=\frac{1}{2\cdot n^2}f^{(2)}(0)+\frac{1}{3!\cdot n^3}f^{(3)}(0)+\ldots+\frac{1}{k!\cdot n^k}f^{(k)}(0)+O(\frac{1}{n^{k+1}}).
$$
Unfortunately I have to go but from that expression you can find all the $f^{(p)}(0)$. You need to write the left hand side as a Taylor expansion (the Taylor expansion of $f(x)=-\frac{1}{1/x^2+1}$ around $0$ and just compare coefficients.
A: First note that if $g(x)$ is differentiable at zero and $g(1/n) = 0$ for all $n$ then $g^{(p)}(0) = 0$ for all $p$.
Now if we write $g(x) = f(x) - \frac{1}{1+x^2}$ we see that $g(1/n) =0$ for all $n$ and it follows that $$f^{(p)}(0) = \frac{d^p}{dx^p} \left. \frac{1}{1+x^2} \right|_{x=0}$$
We can determine the derivatives of $\frac{1}{1+x^2}$ at zero using Taylor's formula.
$$\frac{1}{1+x^2} = \sum_{n=0}^\infty (-1)^n x^{2n}$$ which means the $p$th derivative is $(-1)^p p!$ if $p$ is even and $0$ if $p$ is odd.
