# If for some sequence $a_n\to \infty$ the limit $\lim_{n\to\infty} f(a_nx)$ exists for all $x\in\mathbb R$, then $\lim_{x\to\infty} f(x)$ exists

A little bit of context. I was given a problem which went like if $$X_n$$ is normally distributed with mean $$a_n$$ and is converging in distribution to $$X$$, then $$a_n\to a$$ for some $$a\in\mathbb R$$ and $$X$$ is normally distributed. The question is quite doable using characteristic functions, I guessed, until I ended up with the problem if both limits $$\lim_{n\to\infty}\cos(a_nt) \ \ \ \text{ and } \lim_{n\to\infty} \sin(a_nt)$$ for all $$t\in\mathbb R$$ then the limit $$\lim_{n\to\infty} a_n$$ exists as well and is finite. If I assume $$a_n$$ is bounded, then I don't have any problem proving the statement. But if $$a_n$$ is unbounded, then there is, without loss of generality, a subsequence $$a_{n_k}\to\infty$$. Therefore my question which is a bit general:

Question. Let $$f:\mathbb R\to\mathbb R$$ be a continuous function and $$a_n$$ be a sequence diverging to $$\infty$$, if $$\lim_{n\to\infty} f(a_nt)$$ exists for all $$t\in\mathbb R$$, do we have $$\lim_{x\to\infty} f(x)$$ exists as well?

The result is well-known if $$a_n=n$$. If we have proven this statement then my original claim is easy to prove. I attempted to mimic the proof in this post, but I stopped where they say $$(f(nmx))_{n\in\mathbb N}$$ is a subsequence of $$(f(nx))_{n\in\mathbb N}$$ since in my particular case I don't have $$(f(a_na_mx))_{n\in\mathbb N}$$ is a subsequence of $$(f(a_nx))_{n\in\mathbb N}$$. However deep inside, I believe there is a possibility for mimicing.

For each positive real $$x$$, there is a unique integer $$r=r(x)$$ such that $$1\le2^rx<2$$. Let $$f(x)=\sin(2\pi(2^rx-1))$$. Then $$f$$ is continuous, $$f(x)=f(2x)=f(4x)=\cdots$$ for all positive $$x$$ (so $$\lim_n f(a_nx)$$ exists for $$a_n=2^{n-1}$$, $$n=1,2,3,\dots$$), but $$\lim_{x\to\infty}f(x)$$ does not exist.
• $r(x)$ is not continuous. Is it obvious that $f$ is continuous? – Kavi Rama Murthy Feb 12 '19 at 12:19
• Yes, it is obvious. All we're doing here is putting a single period of the sine function on each of $[1,2),[2,4),[4,8),\dots$. – Gerry Myerson Feb 12 '19 at 20:46
Let $$g(x)=\begin{cases}2x&0\le x\le\frac12\\ 2(1-x)&\frac12\le x\le 1\\0&\text{otherwise}\end{cases}$$, a bump of height $$1$$ supported on $$[0,1]$$.
For $$a_n=2^n$$, consider the following function: $$f(x)=g(x-2)+g(x-6)+g(x-14)+\cdots+g(x+2-2^n)+\cdots$$ For any $$x$$, at most one element of the sequence $$2^nx$$ is in one of those intervals $$(2^k-2,2^k-1)$$ where $$f$$ is nonzero. As such, $$\lim_{n\to\infty}f(2^n x)=0$$ for all $$x$$. On the other hand, $$\lim_{x\to\infty}f(x)$$ doesn't exist, since there are peaks with value $$1$$ no matter how far out we go.