I want to prove a connection between convergences of two sequences. Let $ a_n $ be a sequence of non-negative real numbers. I want to prove that
$$ \frac{a_n}{n} \to 0 \quad \text{as} \quad n\to \infty $$ if and only if $$ \frac{1}{2^N}\max\limits_{1\le n \le 2^N}a_n \to 0 \quad \text{as} \quad N \to \infty. $$
At the beginning I thought about Cauchy condensation test, but it have not worked. And then I tried to use the limit definition.

*

*Let us have the convergence $ \frac{a_n}{n} \to 0 $ then $ \; \forall \varepsilon > 0 \; \exists M(\varepsilon) \in \mathbf{N}: \; n\ge M(\varepsilon) \; \Rightarrow \; \frac{a_n}{n} < \varepsilon $
when $ n\le 2^N $ we have $ \frac{a_n}{2^N} \le \frac{a_n}{n} < \varepsilon $, $ \; \frac{a_n}{2^N} < \varepsilon $, $ \; \max_{1\le n \le 2^N} a_n / 2^N <\varepsilon $. Something like this.


*Let now that $ \frac{1}{2^N}\max\limits_{1\le n \le 2^N}a_n \to 0 $ ...
I tried to do something like in the previous paragraph, but nothing succeeded. And I do not know what I should do next.
I will be very grateful for any ideas.
 A: For your first step, you were really close.
Let's restate what you have.
Suppose $\displaystyle \lim_{n \to \infty} \dfrac{a_n}{n} = 0$. Given $\varepsilon > 0$, choose $M(\varepsilon) \in \mathbb{N}$ such that $\forall n \ge M(\varepsilon)$, you have $\dfrac{a_n}{n} < \varepsilon$. Now, for all $N \ge \log_2 M$, you have:
$$n \ge M(\varepsilon) \Longrightarrow \dfrac{a_n}{2^N} < \varepsilon$$
Now, let's take a break from the proof, and discuss what we are looking for and how to find it.
We want:
$$\forall 1 \le n \le M(\varepsilon), \dfrac{a_n}{2^N} < \varepsilon$$
Hence, we want $a_n < 2^N \varepsilon$. We are looking to choose $N$ to make this true for any $1 \le n \le M(\varepsilon)$. So, let's create a finite set (that is determined solely by $\varepsilon$) whose maximum will be a good value for $N$:
Let $$A_\varepsilon = \left\{ \log_2\left(\dfrac{a_n}{\varepsilon}\right) \mid 1 \le n \le M(\varepsilon)\right\}$$
Now, choose any integer $N > \max A_\varepsilon \cup \{ \log_2 M(\varepsilon) \}$. This means:
Choose any $1 \le n \le 2^N$. If $n < M(\varepsilon)$, then $$\dfrac{a_n}{2^N} < \dfrac{a_n}{2^{\max A_\varepsilon}} \le \dfrac{a_n}{2^{\log_2 \tfrac{a_n}{\varepsilon}}} = \varepsilon$$
If $M(\varepsilon) \le n \le 2^N$, then you are in the case you already showed above.
This is enough to complete the proof for the forward implication. Next, we need the backwards implication.
So, ask yourself the same questions. What would satisfy the proof? What do you need to get there?
Given $\varepsilon > 0$, you want to find $M(\varepsilon) \in \mathbb{N}$ such that for all $n \ge M(\varepsilon), \dfrac{a_n}{n} < \varepsilon$. For this to be true, you need:
$$a_n < \varepsilon n$$
You can choose $N(\varepsilon) \in \mathbb{N}$ such that for all $\displaystyle N \ge N(\varepsilon), \dfrac{1}{2^N} \max_{1 \le n \le 2^N} a_n < \varepsilon$. Choose $M(\varepsilon) = 2^{N(\varepsilon)}$. Now, you have $2^{N(\varepsilon)} > N(\varepsilon)$, so your condition holds.
For any $n \ge M(\varepsilon)$, you have:
$$\dfrac{a_n}{n} \le \dfrac{a_n}{M(\varepsilon)} \le \dfrac{a_n}{2^{N(\varepsilon)}} \le \dfrac{1}{2^{N(\varepsilon)}} \max_{1 \le k \le 2^{N(\varepsilon)} } a_k < \varepsilon$$
A: $\def\vps{\varepsilon}$
$$\lim_{n \to \infty} \frac{a_n}n = 0 \ \Leftrightarrow \ \lim_{m \to \infty} (\frac1{2^m}\max_{1\le j \le 2^m} a_j) = 0.$$
$(\Rightarrow):$ Let $\vps>0$. There is $k \in \mathbb N$ such that $\frac{a_n}n<\vps$ whenever $n \ge k$. Choose $l \in \mathbb N$ large enough such that $\frac1{2^l}\max_{1\le j < k} a_j < \vps$.
Let $m \ge l$ and let $a_{n_0} = \max_{1\le j \le 2^m} a_j$, where $1 \le n_0 \le 2^m$. If $n_0<k$, then $\max_{1\le j \le 2^m} = \max_{1\le j < k} a_j$ and
$$ \frac1{2^m}\max_{1\le j \le 2^m} a_j \le \frac1{2^l} \max_{1\le j < k} a_j < \vps.$$
If $n_0 \ge k$, then
$$ \frac1{2^m}\max_{1\le j \le m} a_j = \frac{ a_{n_0}}{2^m} \le \frac{a_{n_0}}{n_0} < \vps,$$
since  $n_0 \le 2^m$.
$(\Leftarrow):$ Let $\vps>0$. There is $l \in \mathbb N$ such that $\frac1{2^m}\max_{1\le j \le 2^m} a_j < \frac\vps2$ whenever $m \ge l$.
Let $k=2^l$. If $n \ge k$, we set $m = \lceil \log_2 n \rceil$, hence, $2^{m-1} < n \le 2^m$ and $m \ge l$. ($\lceil a \rceil$ is the nearest integer to $a$ from the right.) It easy to see that
$$ \frac{a_n}n < \frac1{2^{m-1}}\max_{1\le j \le 2^{m-1}} a_j \le 2 \cdot \frac1{2^m}\max_{1\le j \le 2^m} a_j < 2 \cdot \frac\vps2 = \vps.$$
