Box Dimension Example
Computing the Box Counting Dimension
Note that showing that there is a sequence of $\varepsilon_k$ such that $\varepsilon_k \to 0$ and $$ \lim_{k\to\infty} \frac{ \log_{\varepsilon_k}(A) }{-\log(\varepsilon_k)} = \frac{1}{2} $$ is not enough to show that $$ \lim_{\varepsilon\to 0} = \frac{ \log(N_{\varepsilon}(A) }{ -\log(\varepsilon) }, $$ which is what you have done in your original computation (with $\varepsilon_k = \frac{1}{k^2}$). You need to show that the result holds for any sequence of $\varepsilon_k$ that tends to zero. This is a bit more work, and could (in general) involve the "trick" that serg_1 mentions. We can, however, do without, as shown below:
Let $\varepsilon \in (0,1]$. We require one ball of diameter $\varepsilon$ (i.e. one interval of length $\varepsilon$, or one box of side length $\varepsilon$) to cover all of the points $n^{-2}$ such that $$ \frac{1}{n^2} < \varepsilon \implies n > \frac{1}{\sqrt{\varepsilon}} = \varepsilon^{-1/2}. $$ No ball of diameter $\varepsilon$ can contain more than one of the remaining points of $A$, thus if $n \le \varepsilon^{-1/2}$, we require a ball to cover that point. As $n$ is a natural number, we will require $\lfloor \varepsilon^{-1/2} \rfloor$ additional balls to cover $A$. Hence $$ N_{\varepsilon}(A) = 1 + \lfloor \varepsilon^{-1/2} \rfloor. $$ Observe that \begin{align} \varepsilon^{-1/2} - 1 < \lfloor \sqrt{\varepsilon} \rfloor \le \varepsilon^{-1/2} &\implies \varepsilon^{-1/2} < N_{\varepsilon}(A) \le 1 + \varepsilon^{-1/2} \\ &\implies \log(\varepsilon^{-1/2}) < \log(N_{\varepsilon}(A)) \le \log(1+\varepsilon^{-1/2}) < \log(2\varepsilon^{-1/2}) \tag{1} \\ &\implies \frac{\log(\varepsilon^{-1/2})}{-\log(\varepsilon)} < \frac{\log(N_{\varepsilon}(A))}{-\log(\varepsilon)} \le \frac{\log(2)-\frac{1}{2}\log(\varepsilon^{-1/2})}{-\log(\varepsilon)} \tag{2} \\ &\implies \frac{1}{2} < \frac{\log(N_{\varepsilon}(A))}{-\log(\varepsilon)} \le \frac{1}{2} - \frac{\log(2)}{\log(\varepsilon)}. \end{align} At (1), we use the fact that $\log$ is increasing and $\varepsilon < 1 \implies \varepsilon^{-1/2} > 1$. We again use the assumption that $\varepsilon < 1$ at (2) (note the negative signs; $-\log(\varepsilon) > 0$). Taking limits as $\varepsilon \to 0$ (and so $\log(\varepsilon) \to -\infty$), we have $$ \frac{1}{2} \le \frac{\log(N_{\varepsilon}(A))}{-\log(\varepsilon)} \le \frac{1}{2}. $$ Since this limit exists, we have the desired result, namely that $$ \dim_B(A) := \frac{\log(N_{\varepsilon}(A))}{-\log(\varepsilon)} = \frac{1}{2}. $$
Computing the Hausdorff Dimension
The Hausdorff dimension of a countable subset of $\mathbb{R}^n$ is $0$, so we have $\dim_{H}(A) = 0$. We'll prove the general result. First recall that the $s$-dimensional Hausdorff measure of a set $F$ is defined to be $$ H^s(F) := \lim_{\delta\to 0} H^s_\delta(F) = \lim_{\delta\to 0} \left( \inf\left\{ \sum_{j=1}^{\infty} \mathrm{diam}(E_j)^s : \text{$\{E_j\}$ covers $E$ and $\mathrm{diam}(E_j) < \delta$} \right\} \right). $$ The Hausdorff dimension is then defined to be $$ \dim_{H}(F) := \inf\left\{ s\ge 0 : H^s(F) = 0 \right\} = \sup\left\{ s\ge 0 : H^s(F) = \infty \right\}. $$ If $F$ is a countable subset of $\mathbb{R}^n$, then it can be enumerated. So we can write $F = \{x_1, x_2, \dotsc\}$. Fix $\delta > 0$, and for each $j=1,2,\dotsc$, let $$ E_j = B(x_j, 2^{-(j+1)} \delta), $$ i.e. $E_j$ is the ball of radius $2^{-(j+1)}\delta$ centered at $x_j$. Notice that
- the collection $\{ E_j \}$ covers all of $F$, since each point of $F$ is the center of one of the balls $E_j$, and
- $\mathrm{diam}(E_j) = 2^{-j}\delta < \delta$.
But if $s > 0$, then $$ H^s_\delta(F) \le \sum_{j=1}^{\infty} \mathrm{E_j}^s = \sum_{j=1}^{\infty} 2^{-js}\delta^s = \delta^s \sum_{j=1}^{\infty} \left( 2^{-s} \right)^j = C \delta^s, $$ where $C = \sum_j (2^{-s})^j$ is a finite constant, since the series is geometric with $r = 2^{-s} < 1$. Since $s > 0$ is fixed, we take limits and obtain $$ H^s(F) = \lim_{\delta\to 0} H^s_\delta(F) \le \lim_{\delta\to 0} C\delta^s = 0. $$ Again, this holds true for any $s>0$, from which it follows that $ \dim_{H}(F) \le 0$. But then $$ \dim_H(F) = 0, $$ as claimed.