Evaluate the sum with special function Evaluate the following sum: $$\sum \limits_{n=1}^{\infty}\dfrac{2^{<n>}+2^{-<n>}}{2^n}$$ where $<n>$ the nearest integer to $\sqrt{n}$.
 A: Since $(k−1/2)^2 = k^2 −k+1/4$ and $(k+1/2)^2 = k^2 +k+1/4$, it follows
that $<j>=k$ if and only if $k^2 −k+1\le j\le k^2+k$. Hence 
$$
\begin{align}
\lim_{n\to \infty}\sum_{j=1}^n \frac{2^{<j>}+2^{-<j>}}{2^j}&=\sum_{k=1}^\infty \sum_{<j>=k}^{k^2+k}\frac{2^{<j>}+2^{-<j>}}{2^j}\\
&=\sum_{k=1}^\infty \sum_{n=k^2-K+1}^{k^2+k}\frac{2^k+2^{-k}}{2^n}\\
&=\sum_{k=1}^\infty (2^k +2^{−k})(2^{−k^2+k}−2^{−k^2−k})\\
&=\sum_{k=1}^\infty(2^{−k(k−2)}−2^{−k(k+2)})\\
&=\sum_{k=1}^\infty 2^{−k(k−2)} -\sum_{k=3}^\infty 2^{−k(k−2)}=3
\end{align}
$$
A: We have $\langle n \rangle = k $ iff $k-\frac{1}{2}< \sqrt{n} < k+\frac{1}{2}$, i.e. iff $k^2-k+1\leq n \leq k^2+k $.
By reindexing on $k$, our series becomes:
$$ \sum_{k\geq 1}(2^k+2^{-k})\sum_{n=k^2-k+1}^{k^2+k}\frac{1}{2^n}=\sum_{k\geq 1}\frac{2^{4k}-1}{2^{k^2+2k}}=2\sum_{k\geq 1}\left(\frac{1}{2^{(k-1)^2}}-\frac{1}{2^{(k+1)^2}}\right) $$
that is a telescopic series. So we get:

$$ \sum_{n\geq 1}\frac{2^{\langle n\rangle}+2^{-\langle n\rangle}}{2^n}={\color{red}{3}}.$$

Pretty nice!
