Prove that there are no analytic function satisfying this property This kind I'm kindly asking you to help me in solving this question:

Prove that there are no analytic functions $f:\mathbb R\to \mathbb R$ such that $$f\left(\frac 1n\right)=\frac{(-1)^n}{n^2},$$ for every $n\in\mathbb N$.

Thank you very much in advance for any hint because I'm out of ideas.
Regards
 A: In fact there is no $f$ two times differentiable in a neighborhood of $0$ such that $f(n^{-1})=\frac{(-1)^n}{n^2}$. Indeed, if $f$ is such a function, then $f(0)=0$, $f'(0)=\lim_{n\to \infty}nf(n^{-1})=\lim_{n\to\infty}\frac{(-1)^n}n=0$ and $f''(0)=\lim_{n\to\infty}n^2f(n^{—1})$ but the last limit is the limit of $(-1)^n$, which doesn't exist.
A: Hint $f(z)=z^2$ for all $z=\frac{1}{2m}$, and this sequence has an accumulation point.
But $f(\frac{1}{2m+1})=- (\frac{1}{2m+1})^2$.
A: $f(x)=x^2\cos\left(\frac{\pi}{x}\right)$ satisfies the given condition on $\mathbb{N}$, but is not analytic at $x=0$.  Its analytic continuation to $\mathbb{C}$ has an essential singularity at $0$.
Since an analytic function is continuous, the Intermediate Value Theorem says that, since $f$ changes sign between $\frac1n$ and $\frac{1}{n+1}$, there is a sequence $\{x_n:\frac{1}{n+1}< x_n<\frac1n\}$ so that $f(x_n)=0$. Since $\lim\limits_{n\to\infty}x_n=0$, the set of zeros of $f$ has $0$ as a limit point. If the set of zeros of an analytic function has a limit point in the domain of said function, the function is identically $0$ on the connected component of that domain containing that limit point.
A: suppose such $f$ were exist, define $g(z)= f(z)- (-1)^nz^2$ which is also holomorphic, but $g(1/n)=0\forall n$ and Uniqueness theorem says that $g(z)\equiv 0$, $f(z)=(-1)^nz^2$ but which is not unique, so no such analytic function cant exist.
