Smooth function passing through a countable number of points Given a sequence $(y_n)_n$ of real numbers, can we find a smooth ($C^1$, $C^2$ or even $C^\infty$) real function $\phi$ such that $\phi(2^n)=y_n$ for all $n\in\mathbb{N}$ ?
It's clear if we want a continuous function since we can connect by straight lines the dots.
It's also clear for a finite number of dots by using spline theory.
I would like to have essentially the regularity on the points $2^n$, $n\in\mathbb{N}$.
Intuitively, I would think it's possible but I don't know how to do it. A sort of generalization of spline theory would be efficient.
Any help, or suggestion would be appreciated.
Thanks
 A: If all the $y_n$ are bounded, then you can use the following construction to create a sequence of bounded $C^{\infty}$ functions $g_n$ such that $g_n(2^k)=y_k$ for $k\leq n$. I'm not sure if this sequence of functions converges to a $C^{\infty}$ function (or converges at all for that matter).
We shall build this $g_n(x)=\prod_{i=1}^nf_n(x)$ where the $f_n(x)$ are bounded and we shall do this inductively so that $g_n(2^k)=y_k$ for $k\leq n$. First off we shall let
$$f_1(x)=((y_1-1)\sin(\frac{\pi}{x})+1)$$
It is clear that $f_1(2)=y_1$, and is bounded.
Now say we have constructed $g_n(x)$ to satisfy $g_n(2^k)=y_k$ for $k\leq n$ and we have that $g_n(2^{n+1})=c_n$, then if we construct our $f_{n+1}(x)$ such that $f_{n+1}(2^k)=1$ for $k<n+1$, $f_{n+1}(2^{n+1})=\frac{y_{n+1}}{c_n}$, and $f_{n+1}(x)$ is bounded, then we will have that $g_{n+1}(2^k)=y_k$ for $k\leq n+1$. So let us define
$$f_{n+1}(x)=((\frac{y_{n+1}}{c_n}-1)\sin(\frac{2^n\pi}{x})+1 )$$
Then we easily check that $f_{n+1}(2^{n+1})=\frac{y_{n+1}}{c_n}$ as required, and it also satisfies $f_{n+1}(2^k)=0$ for $k<n+1$.
A: Yes, we can. Let us first prove the following
Lemma. Let $a,b, c,d \in \mathbb R$ such that $a < b$. Then there exists a smooth ($C^\infty$) function $f :  \mathbb R \to \mathbb R$ such that $f = c$ on $(-\infty,a]$ and $f = d$ on $[b,\infty)$.
Proof. It suffices to construct $f$ for $a=0, b=1$ and $c = 0, d= 1$ (for the general case the function $\tau \circ f \circ \sigma$ with $\sigma(x) = \frac{x-a}{b-a}$ and $\tau(y) = c + (d-c)y $ will do). It is well-known that the function
$$g(x) = \begin{cases} 0 & x \le 0 \\ e^{-1/x} & x  > 0 \end{cases} $$
is smooth. Now let
$$f(x) = \frac{g(x)}{g(x) + g(1-x)} .$$
Note that not both of $x$ and $1-x$ can be $\le 0$, thus $f$ is well-defined and smooth. Clearly $f=0$ on $(-\infty,0]$ and $f = 1$ on $[1,\infty)$.
Let us construct the desired $\phi$. Set formally $y_0 = 0$. For $n  \ge 1$ let $f_n : \mathbb R \to \mathbb R$ be smooth such that $f_n = 0$ on $(-\infty,2^{n-1}]$ and $f_n = y_n - y_{n-1}$ on $[2^n,\infty)$. Now define
$$\phi = \sum_{n=1}^\infty f_n .$$
This is a well-defined smooth function because for each $x \in \mathbb R$ there exists $m$ such that $x \in (\infty,2^m)$. Thus for $n > m$ and $x' \in (\infty,2^m)$ we have $f_n(x') = 0$ and therefore on the open neighborhood $(\infty,2^m)$ of $x$ we get $\phi = \sum_{n=1}^m f_n$  which is a finite sum of smooth functions. Moreover $f_n(2^k) = 0$ for $n > k$ and therefore
$$\phi(2^k) = \sum_{n=1}^k f_n(x) =  \sum_{n=1}^k (y_n - y_{n-1}) = y_k - y_0 = y_k .$$
