Let $n$ to be a positive integer. Given a set $\{ a_1, a_2, \ldots, a_n \} $ of integers, where $a_i \in \{ 0, 1, 2, 3, \ldots, 2^n -1 \},$ $\forall i$, we associate to each of its subsets the sum of its elements; particularly, the empty subset has sum of its elements equal to $0$. If all of these sums have different remainders when divided by $2^n$, we say that $\{ a_1, a_2, \ldots, a_n \} $ is $n$-complete.
For each $n$, find the number of $n$-complete sets.
Lemma 1: If $A = \{ a_1, a_2, \ldots, a_n \}$ is an $n$-complete set, then $2^{n-1} \in A$
Proof:
Consider the polynomial $P(x) = \prod_{i=1}^{n} (1+x^{a_i})$. It's clear that, if $s_1, s_2, \ldots, s_{2^n}$ are all the possible sums of the subsets of $A$, then $P(x) = \sum_{k=1}^{2^n} = x^{s_k}$.
Therefore, if the $s_k 's$ are all distinct modulo $2^n$, we have that $P(\omega) = 0$, where $\omega = e^{2 \pi/2^n}$. That means that $P(w) = \prod_{i=1}^{n} (1+w^{a_i}) = 0$, and then there exists $i$ such that $1+\omega^{a_i} = 0$, what means that $2^{n-1}$ belongs to the set, as desired.
Now, let $f(k)$ to be the number o $k$-complete sets. We will prove that $f(k) = 2^{k(k-1)/2}$, via induction.
The basis case is straightforward and we suppose the above assertion is true for all $k < n$, and that's our hypothesis. Let's now prove the inductive step.
Let $A = \{ a_1, a_2, \ldots, a_n \}$ to be an $n$-complete set. By Lemma 1, we know that $A = \{ 2^{n-1} \} \cup \{a_1, a_2, \ldots, a_{n-1} \}$, and if $A$ is $n$-complete, then $\{ a_1, a_2, \ldots, a_{n-1} \}$ must be $(n-1)$-complete, otherwise there are two subsets of $A$, say $A_1$ and $A_2$, s.t. $s(A_1) \equiv s(A_2)$ $\mod{2^{n-1}}$, where $s(X)$ denotes the sum of the elements of the set $X$. But then, wlog, $A_1 \equiv A_2$ $\mod{2^n}$, which is a contradiction, or $A_1 \equiv A_2 + 2^{n-1}$ $\mod{2^n}$, which is also a contradiction, because we would have $s(A_1 \cup \{ 2^{n-1} \}) \equiv s(A_2)$ $\mod{2^{n-1}}$.
Therefore, for some $(n-1)$-complete set $B = \{ b_1, b_2, \ldots, b_{n-1} \}$, we must have $A \setminus \{2^{n-1} \} \equiv B \mod{2^{n-1}}$ (ok, I know it is an abusive notation, but I mean that the elements of $A \setminus \{2^{n-1} \}$ are congruent to the elements of $B$ $\mod{2^{n-1}}$, in some order).
Suppose wlog that $a_i \equiv b_i \mod{2^{n-1}}$. Once $0 \le a_i \le 2^{n} - 1$ and $0 \le b_i \le 2^{n-1} - 1$, we must have $a_i = b_i$ or $a_i = b_i + 2^{n-1}$. We now prove that every single set $A = \{ a_1, a_2, ..., a_n \}$ satisfying, wlog, $a_n = 2^{n-1}$ and $a_i = b_i$ or $a_i = b_i + 2^{n-1}$, for all $1 \le i \le n-1$, is $n$-complete, where $B = \{ b_1, b_2, ..., b_{n-1} \}$ is an $(n-1)$-complete set.
Suppose this is not true. This implies that there exist two subsets of $A$ which have the same remainders when divided by $2^n$, and then it's also true they have the same remainder when divided by $2^{n-1}$. Once $a_n = 2^{n-1}$, we can suppose this element is not in any of the two sets. So we have $\{ b_{x_1}, b_{x_2}, \ldots, b_{x_q} \}$ $\equiv$ $\{ a_{x_1}, a_{x_2}, \ldots, a_{x_q} \}$ $\equiv$ $\{ a_{y_1}, a_{y_2}, \ldots, a_{y_p} \}$ $\equiv$ $\{ b_{y_1}, b_{y_2}, \ldots, b_{y_p} \}$ $\pmod{2^{n-1}}$, what implies that $B$ is not $(n-1)$-complete, contradiction.
Therefore, all the sums of subsets of $A \setminus \{ 2^{n-1} \}$ are distinct $\mod{2^{n-1}}$, what means that all the sums of subsets of $A$ are distinct $\mod{2^n}$, implying that $A$ is an $n$-complete set.
So all the $n$-complete sets are created by adding ${2^{n-1}}$ to each element of an $(n-1)$-complete set or not. Then, for each $(n-1)$-complete set, we have $2^{n-1}$ $n$-complete sets. Once $f(n-1) = 2^{(n-1)(n-2)/2}$ are $(n-1)$-complete sets, we have $f(n) = 2^{n-1} f(n-1) = 2^{n-1} \times 2^{(n-1)(n-2)/2} = 2^{n(n-1)/2}$, as desired.
I think you didn't understand my question. First, you wrote $a_i\in\{1,2,\cdots,2^n\}$, and if there was no repeated elements (that is, if there were no $i\ne j$ such that $a_i=a_j$... note that the set is still well defined in this case, you didn't mention it should have $n$ elements), there would be at most one $n$-complete set, $\{1,2,\cdots,2^{n-1}\}$.
But I see the previous statement was wrong and you edited it.
This problem is mine. Here are a few solutions/remarks.
The best way to tackle this problem is probably by checking small cases first. Trying out $n=3$ should give you enough information to make a reasonable conjeture. Even if you don't spot the whole pattern at first, conjeturing that either
1. $2^{n-1}$ always belongs to the set, or
2. There is always exactly one odd number in the set
seems to be enough to lead you to an actual solution. A solution has already been posted based on the first point, and is, from what I heard, what most people did during the exam. Here is a second solution, which is actually the one I submitted, and is based on the second point.
Solution. We will prove by induction on $n\in \mathbb N,\ n\ge 1$, that the number of $n$-complete sets is exactly $2^\frac{n(n-1)}{2}$. This holds trivially for $n=1$, since the only $1$-complete set is $\{1\}$.
Suppose the assertion holds for some $n\ge 1$ and lets prove it for $n+1$. In what follows, all sums are viewed modulo $2^{n+1}$. Let $A=\{a_1,a_2,\dots,a_{n+1}\}$ be an $n+1$-complete set. Note that some of the numbers $a_1,a_2,\dots,$ $a_{n+1}$ is odd: indeed, some sum of the form $\sum a_i$ must be congruent to $1$ módulo $2^{n+1}$. Wighout loss of generality, $a_{n+1}$ is odd. Let $B=\{a_1,a_2,\dots,a_n\}$ and let $S$ be the set of all sums of subsets of $B$. Let $T=\{s+a_{n+1}/s\in S\}$. Notice that the sums of subsets of $A$ are exactly those in $S\cup T$, and that there are no reapeated sums in $S\cup T$ (viewed as multisets). Since $a_{n+1}$ is coprime with $2^{n+1}$ then the sets $\{0,1,2,\dots2^{n+1}-1\}$ and $\{0,a_{n+1},2a_{n+1},\dots,$ $(2^{n+1}-1)a_{n+1}\}$ are equal modulo $2^{n+1}$.
We have $0\in S$ and $a_{n+1}\in T$. Suppose that $2a_{n+1}\in T$. Then by deleting the term $a_{n+1}$ from this sum in $T$ we obtain that $2a_{n+1}-a_{n+1}=a_{n+1}$ is in $S$, a contradiction. Therefore, $2a_{n+1}\in S$. Now by adding $a_{n+1}$ to this sum, it follows that $2a_{n+1}+a_{n+1}=3a_{n+1}$ belongs to $T$. In a similar way we prove that $4a_{n+1}\in S$. Continuing this way, we deduce that $S$ consists exactly of all those sums of the form $ma_{n+1}$ with $m$ even, $0\le m\le 2^{n+1}-1$ and $T$ consists exactly of all those sums of the form $ma_{n+1}$ with $m$ odd, $0\le m\le 2^{n+1}-1$. But it is clear that the sets $\{0,2a_{n+1},4a_{n+1},\dots,(2^{n+1}-2)a_{n+1}\}$ and $\{0,2,4,\dots,2^{n+1}-2\}$ are the same modulo $2^{n+1}$ and that the sets $\{1,3a_{n+1},5a_{n+1},\dots,(2^{n+1}-1)a_{n+1}\}$ and $\{1,3,5,\dots,2^{n+1}-1\}$ are also the same modulo $2^{n+1}$. Therefore, we obtain that $S=\{0,2,4,\dots,2^{n+1}-2\}$ and $T=\{1,3,5,\dots,2^{n+1}-1\}$. In particular, $a_1,a_2,\dots,a_n$ must all be odd. Thus, if we consider the numbers $a'_i=\frac{a_i}{2},\ 1\le i \le n$ then the set $\{a'_1,a'_2,\dots,a'_n\}$ is $n$-complete (note that $a'_i=\frac{a_i}{2}\le \frac{2^{n+1}-2}{2}=2^n-1 \ \forall \ i$), its subsets having sums $\{\frac{0}{2},\frac{2}{2},\frac{4}{2},\dots,\frac{2^{n+1}-2}{2}\}=\{0,1,2\dots,2^n-1\}$ modulo $2^n$. In fact, it is necesary and sufficient that the set $\{a'_1,a'_2,\dots,a'_n\}$ be $n$-complete and that $a_{n+1},\ 0\le a_{n+1}\le 2^{n+1}-1$ be odd for the set $\{a_1,a_2,\dots,a_{n+1}\}$ to be $n+1$-complete. Indeed, if $\{a'_1,a'_2,\dots,a'_n\}$ is $n$-complete and $a_{n+1}$ is odd then if follows easily that $S=\{0,2,4,\dots,2^{n+1}-2\}$ and then $T=\{1,3,5,\dots,2^{n+1}-1\}$, therefore the set $\{a_1,a_2,\dots,a_{n+1}\}$ is $n+1$-complete (note that $2a'_i\le 2\cdot (2^n-1)=2^{n+1}-2 \ \forall \ i$). Since there are exactly $2^\frac{n(n-1)}{2}$ $n$-complete sets by the inductive hypothesis, and there are exactly $2^n$ ways to choose $a_{n+1}$, which is an odd number between $0$ and $2^{n+1}-1$ inclusive (and which is different from all the remaining $a_i$, because it is odd), we conclude that there are exactly $2^\frac{n(n-1)}{2}\cdot 2^n=2^\frac{n(n+1)}{2}$ $n+1$-complete sets, finishing the inductive step and the solution.
Coment. In fact, with the above inductive argument it is easy to characterize all $n$-complete sets: they are those of the form $\{2m_1+1,4m_2+2,8m_3+4,\dots,2^n m_n+2^{n-1}\}$ where $0\le m_i< 2^{n-i}$ for each $i$. For each $i$ there are exactly $2^{n-i}$ possible values for $m_i$, and since it is clear that all these $a_i$ are distinct, it follows that there are exactly $\prod_{i=1}^{n} 2^{n-i}=\prod_{i=0}^{n-1} 2^i=2^\frac{n(n-1)}{2}$ $n$-complete sets.