This week’s Riddler Classic is simple to state, but tricky to figure out:

What whole number dimensions can rectangular prisms have so that their volume (in cubic units) is the same as their surface area (in square units)?

Here is my solution:

[Show Solution]

If the side lengths of the prism are $a,b,c$, then the volume being equal to the surface area implies that

\[

abc = 2ab+2ac+2bc.

\]Let’s assume the side lengths are ordered, so $a \ge b \ge c$. We therefore have: $ab \ge ac \ge bc$. So $abc = 2ab+2ac+2bc \leq 6ab$. Simplifying, we obtain $c \leq 6$. We can now consider each case separately:

- If $c=6$, our equation reduces to $ab=3a+3b$. Rearranging and factoring, this is $(a-3)(b-3)=9$. Since $c=6$ was assumed to be the smallest side length, each of the factors $(a-3)$ and $(b-3)$ is at least $3$. So the only solution is $(6,6,6)$.
- If $c=5$, our equation reduces to $3ab=10a+10b \le 20a$. Therefore, $3b \le 20$ and so $b \le 6$. Since $c\le b$, this means we only have to check $b=5$ and $b=6$. Checking each case, we find the only solution is $(10,5,5)$.
- If $c=4$, our equation reduces to $ab=4a+4b$. Rearranging and factoring, this is $(a-4)(b-4)=16$. Each way of factoring $16$ as a product of two factors yields a different solution. These are: $16\times 1$, $8\times 2$, and $4\times 4$. The resulting $(a,b,c)$ triples are: $(20,5,4)$, $(12,6,4)$, $(8,8,4)$.
- If $c=3$, our equation reduces to $ab=6a+6b$. Rearranging and factoring, this is $(a-6)(b-6)=36$. Each way of factoring $36$ as a product of two factors yields a different solution. These are: $36\times 1$, $18\times 2$, $12\times 3$, $9\times 4$, $6\times 6$. The resulting triples are: $(42,7,3)$, $(24,8,3)$, $(18,9,3)$, $(15,10,3)$, $(12,12,3)$.
- If $c=2$, our equation reduces to $0=4a+4b$, which has no solutions.
- If $c=1$, our equation reduces to $0=ab+2a+2b$, which also has no solutions.

And that’s it! Overall, the problem has exactly 10 solutions. They are:

$(6,6,6)$, $(10,5,5)$, $(20,5,4)$, $(12,6,4)$, $(8,8,4)$, $(42,7,3)$, $(24,8,3)$, $(18,9,3)$, $(15,10,3)$, $(12,12,3)$.

Note: I assumed that “whole number” in this context means a positive integer. If we allow for side lengths of zero, then any degenerate prism with side lengths $(a,0,0)$ will have both area and volume equal to zero, so there are infinitely many solutions.

Another note: If there were some way to upper-bound $a$, then we could do an exhaustive numerical search to find all solutions because there would only be finitely many triples $(a,b,c)$ to search. Alas, I have not been able to find an upper bound on $a$. I suspect it might not be possible, since if we set $a\to\infty$, the problem reduces to $bc=2b+2c$, which is the 2D version of the problem (a rectangle whose area equals its perimeter)!

You can use ordering to show that c is at least 3, this leaves the most space for b, a. If c is 3 then b is at least 7, again maximizing a. If c is 3 and b is 7 then a is 42.

Fun fact is that in higher dimensions you can keep going along this route to get that if the max side for dimension d is m_d then m_{d+1}=m_d*(m_d+1)

Unfortunately this becomes really big really fast

This is really a nice solution. I got stumped by this one and thought it could be solved only by coding.

As someone who enjoys solving The Riddler as well, I always look forward to the way you approach these problems, it’s very cool! I just brute forced it in R like so: https://julianegerez.github.io/blog/2019/12/19/The-Riddler-Prismatic-Puzzle but I was left thinking about how to approach this more rigorously, so thanks for that.

This doesn’t use ordering, but https://www.wolframalpha.com/input/?i=integer+solutions+to+abc+%3D+2%28ab%2Bbc%2Bca%29 tells me that: a>=3 and b>(2 a)/(a – 2) and c = (2 a b)/(a (b – 2) – 2 b). Does that provide any additional insight?

Divide your first equation by 2abc and it reduces to finding three unit fractions whose sum is 1/2. This feels much simpler, although the casework will be the same. The same idea works in higher dimensions: the answer is the number of ways to represent 1/2 as a sum of n unit fractions. Equivalently, it’s the number of ways to represent 1 as a sum of n+1 unit fractions, where one of the fractions must be 1/2. This implies an upper bound on the dimensions in terms of the Sylvester sequence.

It’s very surprising that the answer is not known for 7. According to https://oeis.org/A002966, it was calculated in 2004 that there are 159330691 ways to express 1 as the sum of 8 unit fractions, and we just need to know how many of those contain the fraction 1/2. In general, the answer to this problem will be at most A002966(n+1) (set one of the n+1 fractions equal to 1/2), but at least A002966(n) (double all the denominators).

Hi, These 10 solutions are the same as those found by tesselation/tiling equations for 3 polygons of sides n. 4 such combinations tile the plane (e.g. 6,6,6, three hexagons, 4,8,8 two octagons and a square) while 6 are “forbidden”, including my favorite, the 42-gon! Can someone cleverer than I am explain why this appears to be the same math problem? Great job with this proof!

https://blogs.ams.org/visualinsight/2015/02/01/pentagon-decagon-packing/