Let $\mathbb N^*$ denote the set of all positive integers. Can we choose functions $f,g:\mathbb N^*\to\mathbb N^*$ such that
- $\displaystyle{\lim_{n\to\infty}\frac{2^{f(n)-1}+g(n)-\sqrt{2n}}{\sqrt n}}=0$ and
- $n\leq\left(2^{f(n)}-1\right)g(n)$ for all $n\in\mathbb N^*$?
Note that if $f$ and $g$ are allowed to have real values, then the answer is yes, since we can choose $f(n)=\log_2\left(\sqrt{2n}+1\right)$ and $g(n)=\sqrt{\frac n2}$ (One can verify using Lagrange multipliers that these $f$ and $g$ are in fact optimal). But I do not know what to do when $f$ and $g$ are restricted to have only integer values.