If I have $ n $-positive integers, and I compute their sum and product, is there any different group of $ n $-positive integers that will have the same sum and product?

For example, if $ a,...,z $ denote 26 positive integers, and we define:

\begin{align} a+b+c+d+....+z &= \text{Sum} \\ a \cdot b \cdot c \cdot d \cdot .... \cdot z &= \text{Product} \end{align}

Is there any way I can get the same Sum and Product from a different group of 26 (in this example) positive integers?

A friend of mine pointed out that knowing that we have a group of 3 that works, we can show that it works for all positive groups of $ n $ integers.

For Example: $ \{3,3,10 \} $ and $ \{2,5,9 \} $ both yield Sum $=16 $ and Product $=90 $.
Now we can just continually add a number (let's say 1) as the next integer to get multiple solutions for $ n =4,5,6,... $.
Explicitly, $ \{ 3,3,10,1 \} $ and $ \{ 2,5,9,1 \} $ both give Sum$=17$ and Product$=90$.

  • $\begingroup$ @dxiv Thank you for the point out, I think I have misinterpreted this question. I will delete the above comment. $\endgroup$ Commented Sep 26, 2016 at 5:04
  • 2
    $\begingroup$ Two sets of 3 positive integers with equal sum and product has explicit examples of different sets that have the same sum and product for $n=3$. $\endgroup$
    – dxiv
    Commented Sep 26, 2016 at 5:12
  • 1
    $\begingroup$ Here is one: $\{ 2,5,9\}$ and $\{ 3,3,10\}$. Here's another : $\{ 2,6,6\}, \{ 3, 3, 8\}$. Here's yet another: $\{ 2,7,12\}$ and $\{ 3,4,14\}$. Another: $\{ 2,8,30\}$ and $\{ 3,5,32\}$. WOW, I never thought this question was so good! $+1$, I wish I could give more. $\endgroup$ Commented Sep 26, 2016 at 5:15
  • $\begingroup$ That's a good question. Don't think so. I think nm $\ne$ (n-k)(m+k) = nm + k (n-m) -k^2 is provable by am/gm and the rest by induction. I might be wrong though. ... yeah k (n-m) - k^2 iff k = 0 or n-m =k which means either n=m or nm=0. Both assumed not true. So I leave induction up to you. (Might not be true) $\endgroup$
    – fleablood
    Commented Sep 26, 2016 at 5:18

2 Answers 2


Given any of lots of pairs $\{a,b\}, \{d,e\}$, you can add a number to each to make matching sum and product. We want $$a+b+c=d+e+f\\abc=def\\f-c=a+b-d-e\\\frac fc = \frac {ab}{de}$$ and we can solve the last two to get $$c=(a+b-d-e)\frac 1{\frac {ab}{de}-1}\\f=(d+e-a-b)\frac 1{\frac {de}{ab}-1}$$ As long as $a+b \neq d+e$ and none are zero we have a solution. As long as the pair with the greater sum also has the greater product both $c,f$ will be positive.


Well it can't be true for 2 values.

$n >0,m>0$ then $nm>0$.

Let $(n+k)+(m-k) = n+m $ and $(n+k)(m-k)=nm $

Then $nm +k (m-n) - k^2 = nm $ so

$k (m-n)= k^2$. If $k \ne 0$ then $m-n=k $ so $m-k = n $ and $n+k=m $.

If $k =0$ then $n+k=n $ and $m+k=m$.

So $n,m $ are the only positive integers (indeed positive reals) where $a+b=n+m;ab=nm$.

This shouldn't surprise us. It's just a restatement of the arithmetic mean vs geometric mean property.

Can we extend that via induction?

To be honest I'm not sure but I think we can.

Or maybe directly

$(a_n - \sum k_i)\prod(a_i + k_i)=a_n\prod a_i \implies \{a_i +k_i,a_n - \sum k_i\} = \{a_i\} $

Can that be proven

  • $\begingroup$ For 2 values, we can't find any other positive integers with the same sum and product, as you mention. However, looks like for 3 or more we can (by modifying the script by @ShreevatsaR pointed to from @dxiv). So can we find multiple solutions for all n>2 then? If so, why? $\endgroup$
    – ItM
    Commented Sep 26, 2016 at 6:52

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .