for $a \in R$, $n \in N$ let $a_n$ closest distance between $a$ and $\frac m {2^n}$, where $m \in Z$. Find maximal possible sum of a series: $\sum_{n=0}^\infty a_n$
I came up with solution for the problem, but I'm solving this for pure self-educational purposes, and I have no answer to check with and have nobody to assess it. I would appreciate if you guys took a look and tell if it's correct.
Suppose $a=3$.
$\begin{array}
\hline
n & 0 & 1 & 2 & 3 & 4 \\
{\frac m {2^n}} & 3 & \frac 5 2 & \frac {11} 4 & \frac {23} 8 & \frac {47} {16}\\
distance & 0 & \frac 1 2 & \frac 1 4 & \frac 1 8 & \frac 1 {16}\\
\hline
\end{array}$
So I assumed that $\sum_{n=0}^\infty a_n = \sum_{n=1}^\infty {\frac 1 {2^n}} = 1$
Edit I reviewed problem according to André's wise insights.
Yes, with any integer $a$ the series sum would be 0. Let's say, $a = \frac 1 3$.
$\begin{array}
\hline
n & 0 & 1 & 2 & 3 & 4 \\
{\frac m {2^n}} & 0 & \frac 1 2 & \frac 1 4 & \frac 3 8 & \frac 5 {16}\\
distance & 0 & \frac 1 6 & \frac 1 {12} & \frac 1 {24} & \frac 1 {48}\\
\hline
\end{array}$
Then $\sum_{n=0}^\infty a_n = \sum_{n=1}^\infty {\frac 1 {a \cdot 2^n}}$
And I believe that maximum sum would be reached with $a=\frac 1 3 $ and equals a.
Would it be a correct answer?