Adding a number to one of prime factors to produce greatest value

79 Views Asked by At

I recently found an interesting question that I had hard time figuring out. The question states as follows:

If 20 were to be added to one of the five prime factors (103)(113)(131)(109)(139) then which would produce greatest value.

By adding 20 on each prime factors and manually multiplying the five values lead me to a conclusion that adding 20 on a lowest prime number 103 produces greatest value and adding 20 on a biggest prime number 139 produced lowest value.

I. (103+20)(113)(131)(109)(139) = 27586471119

II. (103)(113)(131)(109)(139+20) = 26424731679

So I was able to find an answer by adding 20 on each value but I'm still not sure why adding a number on a smallest prime factor yields biggest value.

2

There are 2 best solutions below

0
On BEST ANSWER

Let's start with 2 numbers. We can call the smaller number $x$ and the larger number $x + y$. If you add z to x then you have $(x+z)(x+y) = x^2 + xy + xz + zy$. If you add z to x + y then you have $(x)(x+y+z) = x^2 + xy + xz$. So for 2 numbers, you will maximize their product by adding it to the smaller number.

By induction, you can expand this to a product of multiple numbers. For 3 factors $a$, $b$, $c$, simply consider the products $a(bc)$, $b(ac)$, and $c(ab)$. We know that adding to the smaller of 2 factors maximizes the product, so adding a number to the smallest factor clearly maximizes the product.

0
On

You are adding $20$ times the product of the remaining primes to the original product. Obviously you want to make the product of the remaining primes as large as possible, so you need to add $20$ to the smallest prime.