Question: For any positive integer $n$, let $\langle n \rangle$ denote the integer nearest to $\sqrt{n}$.
(a) Given a positive integer $k$, describe all positive integers $n$ such that $\langle n\rangle=k$.
(b) Show that $$\sum_{n=1}^\infty \frac{2^{\langle n\rangle}+2^{-\langle n\rangle}}{2^n}=3.$$
My approach: It is clear that there are exactly $2n$ integers between $(n+1)^2$ and $n^2$, $\forall n\in\mathbb{N}$. Now, by the pattern that we observe we can conclude that out of these $2n$ integers the first $n$ integers, let us call them $k$, have $\langle k \rangle =n$ and the other $n$ integers, let us call them $l$, have $\langle l\rangle=n+1.$
Therefore, for any $k\in\mathbb{N}$, the positive integers $n$ that have $\langle n\rangle=k$ are $k^2-(k-1), k^2-(k-2),\cdots, k^2, k^2+1, k^2+2, \cdots, k^2+k.$
Therefore, we are done with part (a) of the question.
Now $\forall k\in\mathbb{N}$ we have, $$\sum_{n=k^2-(k-1)}^{k^2+k}\frac{2^{\langle n\rangle}+2^{-\langle n\rangle}}{2^n}\\=\sum_{n=k^2-(k-1)}^{k^2+k}\frac{2^{k}+2^{-k}}{2^n}\\=(2^k+2^{-k})\sum_{n=k^2-(k-1)}^{k^2+k}\frac{1}{2^n}\\=(2^k+2^{-k})\frac{2^{-(k^2-(k-1))}((2^{-1})^{2k}-1)}{2^{-1}-1}\\=(2^k+2^{-k})\frac{2^{k-1-k^2}(2^{-2k}-1)}{2^{-1}-1}\\=(2^k+2^{-k})\frac{2^{-k^2-k-1}-2^{k-1-k^2}}{2^{-1}-1}\\=(2^k+2^{-k})(2^{k-k^2}-2^{-k^2-k})\\=2^{2k-k^2}-2^{-k^2-2k}=2^{1-(k-1)^2}-2^{1-(k+1)^2}=(2^{1-(k-1)^2}+2^{1-k^2})-(2^{1-k^2}+2^{1-(k+1)^2}).$$
Define the sequence $\{a_n\}_n\ge1$, such that $$a_n=2^{1-(n-1)^2}+2^{1-n^2}, \forall n\in\mathbb{N}.$$
Therefore, $\forall k\in\mathbb{N}$ we have, $$\sum_{n=k^2-(k-1)}^{k^2+k}\frac{2^{\langle n\rangle}+2^{-\langle n\rangle}}{2^n}=a_k-a_{k+1}.$$
This implies that $$\sum_{n=1}^\infty\frac{2^{\langle n\rangle}+2^{-\langle n\rangle}}{2^n}=\sum_{i=1}^\infty a_i-a_{i+1}=\lim_{l\to\infty}(a_1-a_{l+1})=3.$$
Hence, $$\sum_{n=1}^\infty\frac{2^{\langle n\rangle}+2^{-\langle n\rangle}}{2^n}=3.$$
As one can see part (a) of the question is done based on observation and not rigorously. Can someone provide a rigorous solution to part (a) of the question and check if part (b) is done correctly and rigorously or not.
The condition states that $ k- \frac{1}{2} \leq \sqrt{n} \leq k + \frac{1}{2}$
Squaring, we get
Now, use the fact that $n $ is integer to conclude
Your part b) is correct.
A nicer solution to b) is to look at what the multiset $\{<n>-n\} \cup \{-<n>-n\}$ is.
Hence conclude that
$$\sum_n \frac{ 2^{<n> } + 2^{-<n> }} { 2^n} = \frac{1}{2^0} + 2\times \sum_{i=1}^\infty \frac{1}{2^i} = 1 + 2 = 3.$$