Does there exist an analytic function s.t. $f\left(\frac{1}{n}\right)=2^{-n}.$

Note that

$$f(z) = 2^{-1/z}$$

is not continuous at $z=0$. Indeed: For $(z_n)_{n \in \mathbb{N}} \subseteq (0,\infty)$ such that $z_n \to 0$, we have

$$f(z_n) \to 0.$$

On the other hand, for $w_n := -z_n \to 0$,

$$f(w_n) \to \infty.$$

Since an analytic function has to be continuous, this contradicts our assumption.