TITLE: analytic function on $\mathbb{C}$ such that $f\Bigl(\frac{1}{2n}\Bigr)=f\Bigl(\frac{1}{2n+1}\Bigr)=\frac{1}{2n}$
QUESTION [5 upvotes]: I was working out some problems from a entrance test paper, and this problem looked a bit difficult. 

Does there exist an analytic function on $\mathbb{C}$ such that $$f\biggl(\frac{1}{2n}\biggr)=f\biggl(\frac{1}{2n+1}\biggr)=\frac{1}{2n} \quad \ \text{for all} \ n\geq 1?$$

I did apply $f$ repeatedly to get some more insights about the problem, but couldn't get anything from it. So how do i solve this one?

REPLY [12 votes]: Suppose there is such an $f(z)$. Let $g(z) = f(z) - z$. If $f(z)$ were analytic, then $g(z)$ would also be analytic. But $g(z)$ has a limiting sequence of zeros (in particular, $g(1/2n) = 0$), and the zeros of any nonconstant analytic function are discrete. Therefore $g(z) = 0$, which is not the case; contradiction. So there is no such analytic function.