There are several rectangular prisms with integer edge lengths that have an internal diagonal of length 2024. What is the greatest volume among these prisms?
Let's say we have a retangular prism with length ℓ, width w, and height h. The volume is V=ℓwh while the length of the internal diagonal is L=√ℓ2+w2+h2. In this case, we then need to looks for all Pythagorean quadruples a2+b2+c2=d2 that have d=2024. While we certainly could use primitive Pythagorean quadruples for the odd divisors of 2024 (namely, 11, 23, and 253), we might as well just brute force the entire thing and do a dumb search: In a series of nested loops, we can loop through a=1,…,2024, b=a,a+1,…,2024, and c=b,b+1,…,2024 and print out the triple (a,b,c) any time that a2+b2+c2=20242. This yields the following forty-one quadruples:
242+6402+19202=20242242+11522+16642=20242642+1682+20162=20242642+13442+15122=20242962+1522+20162=20242962+8722+18242=20242962+9362+17922=20242962+10882+17042=202421522+8642+18242=202421682+13442+15042=202421922+8562+18242=202421922+13042+15362=202422242+6002+19202=202422242+6722+18962=202422242+11762+16322=202422642+5282+19362=202422642+12322+15842=202422802+5762+19202=202423602+8002+18242=202423602+13762+14402=202423682+11042+16562=202424242+4802+19202=202424242+7682+18242=202424242+12482+15362=202424802+5762+18802=202425282+11442+15842=202425762+7442+17922=202425762+9282+17042=202425762+12162+15122=202425762+13682+13762=202426002+6402+18242=202426722+9362+16642=202426722+11762+15042=202427442+10882+15362=202427682+13042+13442=202427682+13042+13442=202428562+12482+13442=202428642+12162+13682=202429282+9362+15362=202429362+11522+13762=2024211042+11042+12882=20242The rectangular prism with integral edge lengths internal diagonal length of 2024 with the largest volume is 1104×1014×1288 which has volume 1,569,835,008. Note that this is not necessarily that far from the overall, non-integral solution of a cube with side length 2024/√3 which has volume 1,595,694,111.621353..., which is only about 1.6% larger than the volume of the integral rectangular prism, so not too shabby.