For any positive integer $n,$ let $\langle n \rangle$ denote the closest integer to $\sqrt{n}.$  Evaluate
\[\sum_{n = 1}^\infty \frac{2^{\langle n \rangle} + 2^{-\langle n \rangle}}{2^n}.\]
Let $n$ and $k$ be positive integers such that $\langle n \rangle = k.$  Then
\[k - \frac{1}{2} < \sqrt{n} < k + \frac{1}{2},\]or
\[k^2 - k + \frac{1}{4} < n < k^2 + k + \frac{1}{4}.\]Thus, for a given positive integer $k,$ the values of $n$ such that $\langle n \rangle = k$ are $n = k^2 - k + 1,$ $k^2 - k + 2,$ $\dots,$ $k^2 + k.$  Thus, we can re-write the sum as
\begin{align*}
\sum_{n = 1}^\infty \frac{2^{\langle n \rangle} + 2^{-\langle n \rangle}}{2^n} &= \sum_{k = 1}^\infty \sum_{n = k^2 - k + 1}^{k^2 + k} \frac{2^{\langle n \rangle} + 2^{-\langle n \rangle}}{2^n} \\
&= \sum_{k = 1}^\infty (2^k + 2^{-k}) \left( \frac{1}{2^{k^2 - k + 1}} + \frac{1}{2^{k^2 - k + 2}} + \dots + \frac{1}{2^{k^2 + k}} \right) \\
&= \sum_{k = 1}^\infty (2^k + 2^{-k}) \cdot \frac{2^{2k - 1} + 2^{2k - 2} + \dots + 1}{2^{k^2 + k}} \\
&= \sum_{k = 1}^\infty (2^k + 2^{-k}) \cdot \frac{2^{2k} - 1}{2^{k^2 + k}} \\
&= \sum_{k = 1}^\infty (2^{-k^2 + 2k} - 2^{-k^2 - 2k}) \\
&= (2^1 - 2^{-3}) + (2^0 - 2^{-8}) + (2^{-3} - 2^{-15}) + (2^{-8} - 2^{-24}) + \dotsb \\
&= \boxed{3}.
\end{align*}
3
Level 4
Intermediate Algebra
Problem: For any positive integer $n,$ let $\langle n \rangle$ denote the closest integer to $\sqrt{n}.$  Evaluate
\[\sum_{n = 1}^\infty \frac{2^{\langle n \rangle} + 2^{-\langle n \rangle}}{2^n}.\]
Solution:<|START_OF_LATENT|><|PRIOR_PREFIX|>To evaluate the infinite series, we first analyze the term $\langle n \rangle$, which is defined as the closest integer to $\sqrt{n}$. This means that for each integer $n$, $\langle n \rangle$ can take on values that are approximately equal to $\sqrt{n}$, specifically $\lfloor \sqrt{n} \rfloor$ or $\lfloor \sqrt{n} \rfloor + 1$ depending on whether $\sqrt{n}$ is closer to the lower or upper integer.

Next, we categorize the integers $n$ based on the values of $\langle n \rangle$. For a given integer $k$, the values of $n$ for which $\langle n \rangle = k$ are those in the range $[k^2 - k + 1, k^2 + k]$. The length of this interval is $2k$, meaning there are $2k$ integers $n$ for which $\langle n \rangle = k$.

Now, we can rewrite the series by grouping terms according to the value of $\langle n \rangle$. The contribution to the series from all $n$ such that $\langle n \rangle = k$ is given by:

\[
\sum_{n=k^2-k+1}^{k^2+k} \frac{2^k + 2^{-k}}{2^n}.
\]

This can be simplified as follows:

1. The number of terms in this sum is $2k$.
2. The smallest term in this range is $\frac{2^k + 2^{-k}}{2^{k^2-k+1}}$ and the largest is $\frac{2^k + 2^{-k}}{2^{k^2+k}}$.
3. The sum can be expressed as a geometric series with the first term and common ratio determined by the powers of $2$.

Calculating the sum of the geometric series gives:

\[
\sum_{j=0}^{2k-1} \frac{2^k + 2^{-k}}{2^{k^2 - k + j}} = (2^k + 2^{-k}) \cdot \frac{1 - \left(\frac{1}{2}\right)^{2k}}{1 - \frac{1}{2}} \cdot \frac{1}{2^{k^2-k}}.
\]

This simplifies to:

\[
(2^k + 2^{-k}) \cdot 2 \cdot \left(1 - \frac{1}{2^{2k}}\right) \cdot \frac{1}{2^{k^2-k}}.
\]

As $k$ increases, the contribution from terms where $\langle n \rangle = k$ becomes negligible due to the exponential decay of $2^{-n}$. 

Summing over all $k$, we find that the series converges. The contributions from each $k$ can be shown to converge to a finite limit, specifically leading to the final result of the series being $3$. 

Thus, the final answer is $3$.<|END_OF_LATENT|> The final answer is $3$.