Let $n$ be a positive integer greater than one and $B=\left\{1,2, \ldots, 2^{n}\right\}$. A subset $A$ of $B$ is called quirky if for any two distinct elements $x, y$ of $B$, whose sum is a power of two, it contains exactly one of them. How many quirky subsets does $B$ have?
The number is $2^{n+1}$. We argue by complete induction on $n$ and set $B_{n}=\left\{1,2, \ldots, 2^{n}\right\}$. Induction base, $n=1$. This case is clear: all four subsets of $B_{1}=\{1,2\}$ are quirky. Induction step, $n \longrightarrow n+1$. It is already known that $B_{n}$ has exactly $2^{n+1}$ quirky subsets. For each quirky set $A$ of $B_{n}$, construct the sets $C_{n}(A)=\left\{2^{n+1}-m \mid\right.$ $\left.m \in B_{n} \backslash A, m<2^{n}\right\}, M_{n}(A)=A \cup C_{n}(A)$ and $N_{n}(A)=M_{n}(A) \cup\left\{2^{n+1}\right\}$. Clearly, $A, C_{n}(A)$ and $\left\{2^{n+1}\right\}$ are pairwise disjoint. The sets $M_{n}(A)$ and $N_{n}(A)$ are quirky: For this, let $x, y$ be different elements of $B_{n+1}$, whose sum is a power of two; without loss of generality, assume $x<y$. In the case $1 \leq x<y \leq 2^{n}$, i.e., $x, y \in B_{n}$, exactly one of the two is contained in $M_{n}(A)$ or $N_{n}(A)$, since $A$ is quirky. In the case $1 \leq x \leq 2^{n}<y \leq 2^{n+1}$, we have $2^{n}<x+y<2^{n+2}$, so $x+y=2^{n+1}$; since $x \geq 1$, $y \neq 2^{n+1}$. By the choice of $C_{n}(A)$, either $x$ is in $A$ or $y$ is in $C_{n}(A)$. The case $2^{n}<x<y \leq 2^{n+1}$ cannot occur, as then $2^{n+1}<x+y<2^{n+2}$. - On the other hand, if $M$ is a quirky subset of $B_{n+1}$, then $A:=M \cap B_{n}$ is a quirky subset of $B_{n}$. The element $y=2^{n+1}-x$ of $B_{n+1}$ with $1 \leq x<2^{n}$ is contained in $M$ if and only if $x \in B_{n}$ is not contained in $A$, since $x+y=2^{n+1}$ is a power of two. The quirkiness of $M$ thus determines for all elements $y$ of $B_{n+1}$ with $2^{n}<y<2^{n+1}$ whether they are contained in $M$; only whether $2^{n+1}$ is an element is still free. Thus, $M$ equals either $M_{n}(A)$ or $N_{n}(A)$, and exactly two quirky subsets of $B_{n+1}$ can be assigned to each quirky subset of $B_{n}$. This completes the proof.

Remark. Often it was mistakenly assumed that the numbers $2^{n-1}$ and $2^{n}$ could not be elements of a quirky subset of $B_{n}$, since for no $x \in B_{n}$ with $x \neq 2^{n-1}$ the number $2^{n-1}+x$ is a power of two and the same phenomenon occurs with $2^{n}$. However, this situation only shows that for every $X \subseteq B_{n}-\left\{2^{n-1}, 2^{n}\right\}$ the four sets $X, X \cup\left\{2^{n-1}\right\}, X \cup\left\{2^{n}\right\}, X \cup\left\{2^{n-1}, 2^{n}\right\}$ are either all quirky or all unquirky subsets of $B_{n}$.