<s>[INST] $\sum_{m=1}^\infty \frac {2^{\widehat m}+2^{-\widehat m}}{2^{m}} =3$ For any positive integer $n$ , let  $\widehat n$ denote the integer nearest to $\sqrt n$. Then how to prove that $$\sum_{m=1}^\infty \frac {2^{\widehat m}+2^{-\widehat m}}{2^{m}} =3$$?
 [/INST] Let $f(m)=m-\widehat m, g(m)=m+\widehat m$, then
\begin{equation}
\sum_{m=1}^{\infty}{\frac{2^{\widehat m}+2^{-\widehat m}}{2^{m}}}=\sum_{m=1}^{\infty}{\left(\left(\frac{1}{2}\right)^{m-\widehat m}+\left(\frac{1}{2}\right)^{m+\widehat m}\right)}=\sum_{m=1}^{\infty}{\left(\frac{1}{2}\right)^{f(m)}}+\sum_{m=1}^{\infty}{\left(\frac{1}{2}\right)^{g(m)}}
\end{equation}
Note that 
\begin{equation}
\widehat{m+1}-\widehat{m}=
\begin{cases}
1 & \text{if} \, m=k^2+k, \, k \in \mathbb{Z}^+\\
0 & \text{otherwise}
\end{cases}
\end{equation}
Thus
\begin{equation}
f(m+1)-f(m)=1-(\widehat{m+1}-\widehat{m})=
\begin{cases}
0 & \text{if} \, m=k^2+k, \, k \in \mathbb{Z}^+\\
1 & \text{otherwise}
\end{cases}
\end{equation}
\begin{equation}
g(m+1)-g(m)=1+(\widehat{m+1}-\widehat{m})=
\begin{cases}
2 & \text{if} \, m=k^2+k, \, k \in \mathbb{Z}^+\\
1 & \text{otherwise}
\end{cases}
\end{equation}
Also $f(1)=0, g(1)=2$. Therefore the sequence $f(m)$ has $f(k^2+k)=k^2, k \geq 1$ occurring twice, and all other non-negative integers occurring once, while the sequence $g(m)$ omits $g(k^2+k)+1=(k+1)^2, k \geq 1$, and contains all other positive integers $ \geq 2$ exactly once.
Thus 
\begin{align}
& \sum_{m=1}^{\infty}{\left(\frac{1}{2}\right)^{f(m)}}+\sum_{m=1}^{\infty}{\left(\frac{1}{2}\right)^{g(m)}} \\
& =\left(\sum_{m=0}^{\infty}{\left(\frac{1}{2}\right)^m}+\sum_{m=k^2, k \geq 1}{\left(\frac{1}{2}\right)^m}\right)+\left(\sum_{m=2}^{\infty}{\left(\frac{1}{2}\right)^m}-\sum_{m=k^2, k \geq 2}{\left(\frac{1}{2}\right)^m}\right) \\
& =\left(\frac{1}{2}\right)^0+2\sum_{m=1}^{\infty}{\left(\frac{1}{2}\right)^m} \\
&=3
\end{align}
</s>