Find all positive integers
![n](/media/m/a/e/5/ae594d7d1e46f4b979494cf8a815232b.png)
for which there exist non-negative integers
![a_1, a_2, \ldots, a_n](/media/m/9/2/c/92c14c25a50ea2e6e7d3f457e8ea9a16.png)
such that
![\frac{1}{2^{a_1}} + \frac{1}{2^{a_2}} + \cdots + \frac{1}{2^{a_n}} = \frac{1}{3^{a_1}} + \frac{2}{3^{a_2}} + \cdots + \frac{n}{3^{a_n}} = 1\text{.}](/media/m/7/f/1/7f1d8bf938ae716282c7cb0e2dba129f.png)
Proposed by Dusan Djukic, Serbia
%V0
Find all positive integers $n$ for which there exist non-negative integers $a_1, a_2, \ldots, a_n$ such that
$$\frac{1}{2^{a_1}} + \frac{1}{2^{a_2}} + \cdots + \frac{1}{2^{a_n}} = \frac{1}{3^{a_1}} + \frac{2}{3^{a_2}} + \cdots + \frac{n}{3^{a_n}} = 1\text{.}$$
Proposed by Dusan Djukic, Serbia