Sizes of a pair of sequences with identical sums of pairs

I will show that the statement is true with the condition that

  • The two multisets $A=\{a_i+a_j:1 \le i<j\le n\}$ and $B=\{b_i+b_j:1 \le i<j\le n\}$ are the same (i.e. if $x \in A$ appears $k$ times in $A$ then $x$ appears $k$ times in $B$).

  • Two sets $\{a_i\}$ and $\{b_i\}$ are not the same.

Let $A(x)=\sum_{i=1}^n x^{a_i}$ and $B(x)=\sum_{i=1}^n x^{b_i}$ then we have $A^2(x)=A(x^2)+2\sum_{i\in A} x^i$ and similarly, $B^2(x)=B(x^2)+2\sum_{i\in B} x^i$. Therefore, $$A(x^2)-B(x^2)=A^2(x)-B^2(x)=[A(x)+B(x)][A(x)-B(x)].$$ Since $A(1)=B(1)=n$ so $A(x)-B(x)=(x-1)^kG(x)$ where $G(1)\ne 0, k \ge 1$.This follows $$(x^2-1)^k G(x^2)=A(x^2)-B(x^2)=[A(x)+B(x)]\cdot (x-1)^k G(x).$$ Therefore, $(x+1)^k G(x^2)=[A(x)+B(x)]G(x)$. Substituting $x=1$ into this and note that $A(1)+B(1)=2n$ and $G(1)\ne 0$, we obtain $n=2^{k-1}$, as desired.


Consider the sequence $(a_k)=(2,4,4)$ and the sequence $(b_k)=(3,3,5)$. Then the two sequences have non-identical sets of elements, but the sets of their pairwise sums are as follows: $$ A=\{2+4,2+4,4+4\}=\{6,8\} $$ $$ B=\{3+3,3+5,3+5\}=\{6,8\} $$

It would then seem that we need to alter the language to make the statement true... maybe it should be a multiset? Maybe the sequences can't have repeated values?

EDIT: Some quick and dirty coding indicates the following question rewrite has a better chance of being true:

Given two sets of natural numbers $A$ and $B$ where $A\neq B$ and $|A|=|B|=n$ such that the restricted sumsets $2^\wedge A$ and $2^\wedge B$ are equal, show that $n=2^m$ for some natural number $m$.

To answer @coffeemath's comment in the OP, you can take $A=\{1,4,5,6\}$ and $B=\{2,3,4,7\}$ as examples of the case $n=4$.