# Lucas buys five items at a store

My nephew Lucas bought five items at his local store, none for more than 100, and all different prices. He claims that their total cost was equal to the five values multiplied together. Can I believe him? If so, how much did he pay for each of the items? • Are all the values integers? Commented Nov 6, 2022 at 17:49 ## 5 Answers I'll address if Non-integral Values were allowed, Lucas is likely true, however there are countless possibilities for the cost Proof: Let the cost of 5 items be $$R_{1}+I_{1}, R_{1}-I_{1}, R_{2}+I_{2}, R_{2}-I_{2}, R_{3}$$ where $$R_{1},R_{2},R_{3}$$ is a rational number and $$I_{1},I_{2}$$ is in form of $$\sqrt{x}$$ where $$x$$ is also rational. Since cost = product of all items, we end up with equation: $$(R_{1}^2-I_{1}^2)(R_{2}^2-I_{2}^2)R_{3}=2R_{1}+2R_{2}+R_{3}$$. Since RHS is independent of $$I_{1}$$ and $$I_{2}$$, one can choose certain values of $$I_{1}$$ and $$I_{2}$$ to make the cost equivalent to the product of cost of all items. Example: Let $$R_{3}$$ be $$30$$ and $$2R_{1}+2R_{2}+R_{3}=210$$ then $$(R_{1}^2-I_{1}^2)(R_{2}^2-I_{2}^2) = 7$$ so let $$(R_{1}^2-I_{1}^2) = 1$$ and $$(R_{2}^2-I_{2}^2) = 7$$. Taking $$R_{1},R_{2} = 45,45$$, the corresponding values for $$I_{1}$$,$$I_{2}$$ will be $$\sqrt{2024}$$,$$\sqrt{2018}$$. Hence all 5 cost price of items are: $$45+\sqrt{2024}$$, $$45-\sqrt{2024}$$, $$45+\sqrt{2018}$$, $$45-\sqrt{2018}$$, $$30$$. All values are under $$100$$ and are distinct Another quintuplet: $$15+\sqrt{223}$$, $$15-\sqrt{223}$$, $$20+\sqrt{396}$$, $$20-\sqrt{396}$$, $$10$$ • I'm Nobody: Can you provide an example? Commented Nov 6, 2022 at 21:30 • There are indeed numerous solutions. But in multiples of 50 cent there are only a few, the smallest being rot5(5.0, 6, 7, 7.0, 9) (rot10 because rot13 doesn't rot digits :-) ) (It is a computer search. not sure it matches Nobody's formula) Commented Nov 6, 2022 at 21:53 • Florian F: Would you please give us the other solutions in multiples of 50 or even 5 cents? Commented Nov 6, 2022 at 23:01 • Edited: There was slight flaw in my equation, also added an example with better text Commented Nov 7, 2022 at 5:32 • The version I have seen of this puzzle insisted the prices be integer numbers of cents, or integers divided by 100. The cents allowed us to combat the fact that products grow more quickly than sums. I think it had three items under 10. Commented Nov 7, 2022 at 5:57 Just doodling some numbers it seems the solution is easiest to solve when we assign the value of 1.00 to one of the items. We would then assign two values of less than 1.00 to two of the other items, such that these two values add up to one. Specifically these two values should be able to be written as fractions and as two-decimal-point numbers (for this example I used 3/4 (0.75) and 1/4 (0.25)). The fourth number should be the product of the denominators of these two fractions (in my example this would be 16.00) At this point your product is now equivalent to the final value * the product of the numerators of your two fractions (in my example 3) while your sum should be equal to the final value + 2 (the initial value we set to 1 plus the two fractions who sum to 1) + your fourth value set above (all in all its FV + 18 for my example). You can then set this to a single equation where FV*3=FV+18. My example has FV=9. So the final values were as follows, with a product and sum of 27: - 16.00 - 9.00 - 1.00 - 0.75 - 0.25 • For the spoiler I just put a > at the start of the line. It then appeared you intended line breaks so I added two spaces at the end of each line. I hope this is what you wanted. Commented Nov 7, 2022 at 15:38 This situation is impossible if all items have integer values, although if different items were allowed to have equal values, we could have $$1+1+1+2+5=10=1\times1\times1\times2\times5$$ or $$1+1+1+3+3=9=1\times1\times1\times3\times3$$ or $$1+1+2+2+2=8=1\times1\times2\times2\times2$$. These are the only integer possibilities (up to reordering), by the following reasoning. • WLOG, say $$a\leq b\leq c\leq d\leq e$$ and $$a+b+c+d+e=abcde$$. • If $$c\geq2$$, then also $$d\geq 2$$ and $$e\geq2$$, so \begin{align*}abcde&\geq abde+abde\geq abd+abd+abe+abe \\ &\geq ab+ab+abd+abe+abe\geq a+b+abe+d+e,\end{align*} which can only be equal to $$a+b+c+d+e$$ if $$a=b=1$$ and $$c=d=e$$, giving $$c^3=3c+2$$, whose only positive integer solution is $$c=2$$. • Otherwise, $$a=b=c=1$$ and we have $$de=d+e+3$$, i.e. $$(d-1)(e-1)=4$$, giving either $$d=e=3$$ or $$d=2,e=5$$. • Meant different prices! Commented Nov 6, 2022 at 18:03 • @Bernardo Slightly edited my answer to reflect that. Do you still want the values to be positive integers? (I assumed so given the number-theory tag.) Commented Nov 6, 2022 at 18:08 Integer solution in dollars As already said by others, a 'normal' solution in dollars is not possible, but one can have a zero sum solution: Buy three products for say 1, 2 and 3 dollar Get that free product that a shop uses to lure customers for 0 dollar Collect all your discounts to get a product for -6 dollar. PS: Once in my life this did happen to me. I got a discounted product + money because there was a manufacturer discount (received at the supermarket) that was higher than the supermarkets (discounted) price. Integer solutions in cents There are many. My way to find some is to look at the sum S4 and product P4 of the first 4 items: (with the 5th price pr5): P4*pr5 = S4+pr5 -> pr5 = S4/(P4-1) thus aiming for P4 = 2 always give a usable value for pr5. start with prices 1,1,1,2 Multiply one number and divide another number by 2,4 or 5 to make unequal and keep to whole cents, e.g.: 0.25,4,1,2 / 0.2,5,1,2 / 0.25,8,0.5,2 (all with a 5th price equal to the sum of the first 4). If Lucas liked expensive gifts: a gift just below 100:

0.01, 80.00, 12.50, 0.20 92,71

If Lucas liked to spend little he only needs to bring 7.62$(and possibly less): If you want to minimize the sum/product the prices should be close together P4 = 5 may yield a solution where pr5 is S4/4 i.e. exactly the average price. 1.00, 1.00, 1.00, 5.00 must then be changed to different values with its sum a multiple of 4 cent. looking at prime factors of the prices in cents: All values a multiple of 4 cent does not work since then we need 0+1+2+3 factors of 5 to get different values. So the factor of 2 have to be divided {0,0,1,7} or {1,1,2+,2+}. Both are possible >! e.g. below$10:
0.05, 6.25, 2.50 6.40 3.80
0.25, 1.25, 2.50 6.40 2.60
0.25, 6.25, 2.50 1.28 2.57
1.25, 6.25, 0.50 1.28 2.32
1.25, 6.25, 0.10 6.40 3.50
0.25, 6.25, 0.50 6.40 3.35
0.50, 2.50, 1.00 4.00 2.00
0.50, 2.50, 5.00 0.80 2.20
0.10, 2.50, 5.00 4.00 2.90

The lowest total displayed above is 10.00$. Changing to a first-4-number-product of 4 or 6 give more prime factors/ more flexibility in reaching different numbers though. And the lowest total I found was with 6: 1.25$ 2.00$1.50$ 1.60$1.27$

• A bit of brute-force code finds your solution with $7.62 to be minimal. Commented Nov 8, 2022 at 3:45 A simple proof why a solution in dollars is impossible: Let's call a,b,c,d,e be the 5 numbers with e being the largest. If these are different positive integers, we have: $$S = a+b+c+d+e < 5 e$$ $$P = a b c d e \geq 1\times2\times3\times4\times e = 24 e$$ Since a number cannot be both < 5e and >= 24 e, there is no way. Someone asked for the half-dollar solutions: 0.50 1.00 2.00 2.50 4.00, value 10.00 0.50 1.00 1.50 3.50 4.00, value 10.50 0.50 1.00 1.50 2.00 10.00, value 15.00 I also searched for multiple of 0.10: I find 1559 solution with numbers <$100,
from (0.9 1.2 1.5 2.0 2.5) to (0.5 0.7 1.2 2.5 98.0)