Inspired by Nihar Mahajan's featured problem

In each of the cases below, there exists only one solution whereby the sum of n n positive integers equals the product.

  • For n = 2 n=2 , we have 2 + 2 = 2 × 2 2+2=2\times 2 .
  • For n = 3 n=3 , we have 1 + 2 + 3 = 1 × 2 × 3 1+2+3=1\times2\times3 .
  • For n = 4 n=4 , we have 1 + 1 + 2 + 4 = 1 × 1 × 2 × 4 1+1+2+4=1\times 1\times2\times4 .

If solution(s) exist for n = 5 , n=5, find the sum of all possible sums (or equivalently, products).

If such a solution does not exist, submit your answer as 0.


The answer is 27.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

7 solutions

Brian Moehring
Jul 30, 2018

Let a b c d e a\leq b\leq c\leq d\leq e be positive integers such that a + b + c + d + e = a b c d e . a+b+c+d+e = abcde. Then a b c d e = a + b + c + d + e 5 e a b c d 5 abcde = a+b+c+d+e \leq 5e \implies abcd \leq 5

There are only a few ways to have the product of four positive integers be at most 5 5 :

  • ( a , b , c , d ) = ( 1 , 1 , 1 , 1 ) (a,b,c,d) = (1,1,1,1) : Then the equation a + b + c + d + e = a b c d e a+b+c+d+e = abcde becomes 4 + e = e 4+e = e which has no solution.
  • ( a , b , c , d ) = ( 1 , 1 , 1 , 2 ) (a,b,c,d) = (1,1,1,2) : Then the equation becomes 5 + e = 2 e e = 5 5+e = 2e \implies e=5
  • ( a , b , c , d ) = ( 1 , 1 , 1 , 3 ) (a,b,c,d) = (1,1,1,3) : Then the equation becomes 6 + e = 3 e e = 3 6+e = 3e \implies e=3
  • ( a , b , c , d ) = ( 1 , 1 , 1 , 4 ) (a,b,c,d) = (1,1,1,4) : Then the equation becomes 7 + e = 4 e e = 7 3 , 7+e = 4e \implies e=\frac{7}{3}, which isn't an integer.
  • ( a , b , c , d ) = ( 1 , 1 , 2 , 2 ) (a,b,c,d) = (1,1,2,2) : Then the equation becomes 6 + e = 4 e e = 2 6+e = 4e \implies e=2
  • ( a , b , c , d ) = ( 1 , 1 , 1 , 5 ) (a,b,c,d) = (1,1,1,5) : Then the equation becomes 8 + e = 5 e e = 2 8+e = 5e \implies e=2 which fails d e d \leq e (it's a repeat)

It follows there are three possibilities: ( a , b , c , d , e ) { ( 1 , 1 , 1 , 2 , 5 ) , ( 1 , 1 , 1 , 3 , 3 ) , ( 1 , 1 , 2 , 2 , 2 ) } (a,b,c,d,e) \in \Big\{(1,1,1,2,5), (1,1,1,3,3), (1,1,2,2,2)\Big\} which gives an answer of ( 1 × 1 × 1 × 2 × 5 ) + ( 1 × 1 × 1 × 3 × 3 ) + ( 1 × 1 × 2 × 2 × 2 ) = 10 + 9 + 8 = 27 (1\times 1\times 1\times 2\times 5) + (1\times 1\times 1\times 3\times 3) + (1\times 1\times 2\times 2\times 2) = 10 + 9 + 8 = \boxed{27}

This is an astonishingly beautiful solution, thank you!

IIIIIawesIIIII . - 2 years, 9 months ago

Log in to reply

No stop that now.

Logan Bursac - 2 years, 9 months ago

Really smart solution!

Hígor Carmanini - 2 years, 9 months ago

Bullshit just bullshit i don't like not being able to solve something but i get it gg

Logan Bursac - 2 years, 9 months ago

Log in to reply

take care. Language!

Robert Vandor - 2 years, 9 months ago

So, in general, if there are n n terms in the sum, you only need to check for positive factorisations of numbers less than or equal to n n with n 1 n-1 factors (including 1's). Then you can check them all like you have. Great proof!

Chris Maitland - 2 years, 9 months ago

Ha! I got the right answer, but failed to add 10+9+8 correctly! Nice solution btw..

Eanna Butler - 2 years, 9 months ago

using similar concept, I only find 1 solution for n=6 1+1+1+1+2+6=1×1×1×1×2×6

Is that correct? Has anyone tried for n=7 and above?

Pierre Shechter - 2 years, 9 months ago

I thought we have to write abt the no of possibilities

Varun Pradhan - 2 years, 9 months ago

I had figured out the 8, 9 10 sums as the three possibilities. Then I goofed by thinking the sum of three consecutive integers is 3 times the middle integer, which is correct, but I multiplied the 8 by 3 to get 24 instead of multiplying the 9 by 3 to get 27.

Kermit Rose - 2 years, 9 months ago

I tried graphing this by forming equations: (a + b + c + d + e) = (a • b • c • d • e), restrict 1 ≤ (a, b, c, d, e) ≤ 5, and integer This then shows me when the two lines are equal.

However, your solution is more elegant, mine was a blunt approach. (sorry for not putting it in LaTeX)

Emerson Hsu - 2 years, 9 months ago
Arjen Vreugdenhil
Aug 20, 2018
  • Solutions of the form ( 1 , 1 , 1 , 1 , x ) (1,1,1,1,x) don't exist, since x = 4 + x x = 4+x cannot be solved.

  • Solutions of the form ( 1 , 1 , 1 , x , y ) (1,1,1,x,y) are possible. We get x y = 3 + x + y ( x 1 ) ( y 1 ) = 4 { x , y } = { 3 , 3 } or { 2 , 5 } . \begin{aligned} xy & = 3 + x + y \\ (x - 1)(y - 1) & = 4 \\ \{x,y\} & = \{3,3\}\ \text{or}\ \{2,5\}.\end{aligned} This results in the solutions 1 + 1 + 1 + 3 + 3 = 1 × 1 × 1 × 3 × 3 = 9 1 + 1 + 1 + 3 + 3 = 1 \times 1 \times 1 \times 3 \times 3 = \boxed{9} , and 1 + 1 + 1 + 2 + 5 = 1 × 1 × 1 × 2 × 5 = 10 1 + 1 + 1 + 2 + 5 = 1 \times 1 \times 1 \times 2 \times 5 = \boxed{10} .

  • Solutions of the form ( 1 , 1 , x , y , z ) (1,1,x,y,z) : write x = 2 + α x = 2 + \alpha , y = 2 + β y = 2 + \beta , z = 2 + γ z = 2 + \gamma ; of course, α , β , γ 0 \alpha,\beta,\gamma \geq 0 . Then x y z = ( 2 + α ) ( 2 + β ) ( 2 + γ ) = 8 + 4 ( α + β + γ ) + xyz = (2+\alpha)(2+\beta)(2+\gamma) = 8 + 4(\alpha + \beta + \gamma) + \cdots while 2 + x + y + z = 8 + α + β + γ . 2+x+y+z = 8 + \alpha + \beta + \gamma. The only way in which these can be equal if α + β + γ = 0 \alpha + \beta + \gamma = 0 , i.e. they are all zero, so that x = y = z = 2 x = y = z = 2 . This gives the solution 1 + 1 + 2 + 2 + 2 = 1 × 1 × 2 × 2 × 2 = 8 1 + 1 + 2 + 2 + 2 = 1 \times 1 \times 2 \times 2 \times 2 = \boxed{8} .

  • Solutions with fewer than two 1s are easily ruled out.

can you explain what's going on in the third bullet?

Michael Shea - 2 years, 9 months ago

Log in to reply

The α \alpha , β \beta , and γ \gamma are just the difference which specifies how much higher than 2 can x, y, and z be. Turns out, they can't really be higher than 2, or else the sum of these differences would bump the product way too much.

C . - 2 years, 9 months ago

Let α + β + γ = k \alpha+\beta+\gamma=k . If the sum is equal to the product, we get 8 + k = 8 + 4 k + non-negative integers 8+k=8+4k+\text{non-negative integers} . Solving this says 3 k + non-negative integers = 0 3k+\text{non-negative integers}=0 . So k k and the other non-negative integers must be 0.

Chris Maitland - 2 years, 9 months ago

shouldn't it be (2+a)(2+b)(2+c) = 8 + 4(a+b+c) + 2(ab+ac+bc) + abc ? Meaning 4 times the sum, not 2... :-B

C . - 2 years, 9 months ago

Log in to reply

Correct. Changes made.

Arjen Vreugdenhil - 2 years, 9 months ago

Arjen -- Mathematical splendor defined.

Jesse Otis - 2 years, 9 months ago

Log in to reply

Real splendor would be a combination of Brian's solution above (giving upper limits) combined with my handling of the case with four ones. But thanks for the accolades, Jesse!

Arjen Vreugdenhil - 2 years, 9 months ago
Noel Lo
Jul 30, 2018

1 + 1 + 1 + 2 + 5 = 1 × 1 × 1 × 2 × 5 \large{1+1+1+2+5=1\times1\times1\times2\times5}

1 + 1 + 1 + 3 + 3 = 1 × 1 × 1 × 3 × 3 \large{1+1+1+3+3=1\times1\times1\times3\times3}

1 + 1 + 2 + 2 + 2 = 1 × 1 × 2 × 2 × 2 \large{1+1+2+2+2=1\times1\times2\times2\times2}

The required sum is 10 + 9 + 8 = 27 10+9+8=\boxed{27} .

Damn it I missed 1+1+2+2+2. Is there anyway to find the solution without having to guess?

Simon The Great - 2 years, 9 months ago

Log in to reply

See Brian's answer. In general, if there are n n terms in the sum, you only need to check for positive factorisations of numbers less than or equal to n n with n 1 n-1 factors (including 1's).

Chris Maitland - 2 years, 9 months ago

You still need to prove there are no more

Laszlo Kocsis - 2 years, 9 months ago

I thought if n=5 then 5 should be in the list. If we follow this only one case will work.

himanshu kumar sharma - 2 years, 9 months ago
Nicola M.
Aug 21, 2018

For who likes to write code, I tried to solve it with Python. Since the higher numbers we try, the bigger is the gap between the sum and the product, I set a range of 100 numbers to try. The shell stops after a while, just cut off redundat solutions (permutations of the same numbers) and you will get as solutions 10, 9 and 8. So 10+9+8 = 27. The code I used is this:

1
2
3
4
5
6
7
8
for a in range(101):
    for b in range(101):
        for c in range(101):
            for d in range(101):
                for e in range(101):
                    if a+b+c+d+e== a*b*c*d*e:
                        print(f'The solution is', a, b, c, d, e)
                        print(a+b+c+d+e) 

You could also restrict the ranges (from a to 100, from b to 100, ...). This makes the result much more readable.

Antoine G - 2 years, 9 months ago
Vinod Kumar
Aug 24, 2018

There are three solutions with n=5, (1,1,1,2,5), (1,1,1,3,3) and (1,1,2,2,2) with equal sum/product. Answer=10+9+8=27.

James Long
Aug 23, 2018

Here's an exhaustive search in Python 2.7.10.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
import itertools
def product_fun(a_list):
   n=1
      for i in a_list:
        n=n*i
   return n

lst=[1,2,3,4,5]
summed_it=0
for x in itertools.combinations_with_replacement(lst,5):
  for i in itertools.permutations(x,5):
     if sum(i)==product_fun(i):
       print "Here is one: ",i
       print "sum ",sum(i)," product", product_fun(i)
       print "--------"
       summed_it(i)+=sum(i)
       break
print "The sum of sums and/or products: ",summed_it 

André Tashiro
Aug 19, 2018

I did MMC for the numbers between 5 to 15 (just for sure), than sum the values and multiplies to check if that number is a solution

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...