# Determine the highest possible sum of all faces of cube

There is a non-negative integer written on all six faces of a cube. Integers on all possible three common adjacent faces (all faces are adjacent to each other) are multiplied and then they are added. The resulting sum is equal to 2022. Find the highest possible sum of all integers on the faces of the cube.

• "they are added" is a bit ambiguous, from the context I suppose we are adding up the 8 products?
– Bass
Feb 28, 2022 at 9:06
• Yes, just add all the products you get by multiplying all three adjacent faces. Feb 28, 2022 at 9:15
• Is zero allowed? Feb 28, 2022 at 9:43
• I am not sure what the issue was, but the question was edited within 20 seconds. I admit the mistake on my part but there were no answers however. I'll make sure this doesn't happen in future. Feb 28, 2022 at 10:10
• Some of us are very hungry for new puzzles here, so 20 seconds is plenty of time for someone to see a new post :-)
– Bass
Feb 28, 2022 at 10:14

The cube has 3 pairs of opposite faces. If we pick 1 face from each pair, then these three faces meet at a vertex of the cube. In fact, the 8 ways to choose these 3 faces correspond to the 8 products.

Call the integers on the pairs of opposite faces $$(a,b)$$, $$(c,d)$$, and $$(e,f)$$. Using our earlier observation, the sum of all 8 products is $$(a+b)(c+d)(e+f)$$, where each product corresponds to choosing one element from each binomial.

Rewrite $$x=a+b$$, $$y=c+d$$, and $$z=e+f$$. Then $$x$$, $$y$$, and $$z$$ are nonnegative integers and $$xyz=2022=2\cdot3\cdot337$$. We seek to maximize $$x+y+z$$. Clearly this is achieved by $$x=y=1$$ and $$z=2022$$ for a total of 2024.

• I was so excited to use the prime factorization and demonstrate uniqueness until I saw that 0 is allowed. Feb 28, 2022 at 9:54
• Yeah, I don't think it originally was, but OP changed it (during the 5 minute window after posting). But that might just be my memory playing tricks, of course.
– Bass
Feb 28, 2022 at 10:01
• I agree. It would have been better to disallow zero or ask for the minimum sum instead. BTW, even though the sum of the faces is unique, the actual face values are not of course. Feb 28, 2022 at 10:01

EDIT: This answers the question as it was during the first 20 seconds of its existence, and zeroes were not allowed. (In my (and Jaap's, see comments) opinion, this is the better form of the puzzle). For the answer to the question as it was amended to be, see @noedne's post.

To maximise the sum of the numbers making up a product, we'll want to minimise all numbers but one. (To create the edges of a rectangular prism from a strip of wood, you get maximum volume by creating a cube. Here we want to be as wasteful as possible: we want to use up maximum amount of wood for the given volume, so we want to build a thin, long shape instead)

So let's see if we can't have five sides with 1, and one with n

There are 8 corners in a cube, 4 of which are adjacent to n, and 4 that aren't. From this, we instantly see we are out of luck: 2022 isn't divisible by 4.

The same argument also rules out the "bigger numbers on two opposing edges, ones elsewhere" option.

So we have to multiply our big number by something. The minimum is then putting a 2 in the mix. It needs to be adjacent to the n, otherwise it's just a repeat of the previous attempt.

This time we get a corner product sum that's divisible by 6 (looking good)

$$2n + 2n + n + n + 2 + 2 + 1 + 1 = 6(n+1) = 2022$$

From this we can solve

$$n=336$$

which gives the maximum sum of all the faces:

$$336+2+1+1+1+1 = 342$$

• Non-negative allows for zeroes, though I must say that the answer you give for strictly positive numbers is more interesting. Feb 28, 2022 at 9:34
• I'm pretty certain the question said "positive integer" when OP posted it. I seem to even recall copy-pasting those words to google to double check that zeroes aren't allowed.
– Bass
Feb 28, 2022 at 9:37
• and yeah, the 0+0+0+1+1+2022=2024 solution to the puzzle as it's written now is utterly non-interesting, and doesn't utilise the properties of 2022 in any way.
– Bass
Feb 28, 2022 at 9:40
• Yes, I just realised that allowing zeroes make it easier and trivial. I added one more question. Feb 28, 2022 at 10:04
• @I'mNobody As I commented on the question, our site mechanics don't really work (at all) with changing questions, so if you think that is a puzzle worth posting (I haven't tried to solve it, but seems quite possible), you should post that extra puzzle as a separate question.
– Bass
Feb 28, 2022 at 10:12