# Numbers obtainable in two ways as a sum over complementary subsets of a set of primes

Let $\{p_1,p_2,\ldots ,p_r\}$ be a set of distinct primes. Denote the set $\{1,2,\ldots ,r\}$ by $C$. Now, let $A,B\subset C$ such that $$A\cup B=C, \quad A\cap B=\emptyset.$$ These sets are called $\textit{complement}$.

Now let $$\sum_{i\in A,j\in B}(p_i-1)(p_j-1)=N.$$

My question is, are there other other complement subsets of $D,E\subset C$ ($A\neq D,E$) such that $$\sum_{i\in D,j\in E}(p_i-1)(p_j-1)=N.$$

If such sets exist what is the minimal order of $C$ which admits such a phenomenon?

Thanks in advance for any help.

It is possible to see that

$$\sum_{i\in A, j\in B} (p_i-1)(p_j-1) = ((\sum_{i\in A} p_i) - \#A)((\sum_{i\in B} p_i) - \#B).$$

This means that if we find two sets of primes adding up to some $n$, we can construct such an example. One can take $7+13=20$ and $3+17=20$.

Take then $C=\{ 3,5,7,13,17 \}$ and $A = \{3,17\}$ and $B=\{5,7,13\}$, we obtain $(20-2)(25-3)$.

But the sets $A'=\{3,5,17 \}$ and $B'=\{7,13\}$ render the same number.

So indeed this can be done.

• The smallest example would then use $(3-1)+(5-1)=(7-1)$, i.e. $\{2,3,5,7\}$ split as $\{2,3,5\}\cup\{7\}$ and $\{2,7\}\cup\{3,5\}$, both with product $42$. There can't be an example with three primes, since the $0/3$ split would have a negative product and the $1/2$ splits would have three different positive products. – joriki Jun 3 '16 at 9:10