From New Scientist #1168, 16th August 1979 [link] [link]
Nowadays, William of Occam is not what he was. I found him recently in the toolshed of his garden — he has retired to his native Surrey — gloomily using his still-sharp razor to prepare a whole series of what I call bricks, he called rectangular parallelpipeds, and you probably call cuboids, each an exact number of centimetres each way. These he would first paint all over with purple paint and then chop up into 1 cu. cm cubes. Finally, with each brick, he put the cubelets with one or more painted faces into one pile and the other cubelets into another, and counted the two piles. He was hoping, he explained, to make a brick which, when painted and cut up, would yield an equal number in each of the two piles. He also wanted the dimensions of the brick to be coprime in pairs. (That is, if the brick is a × b × c centimetres, a and b having no common factor; nor have a and c; nor b and c.)
I went away, leaving William sawing away regardless. And now I ask you, what are the dimensions of the brick of smallest volume which will meet the old man’s requirements?
[enigma26]
The following Python program runs in 124ms.
Solution: The smallest volume brick has dimensions 7 × 9 × 20 cm. It has a volume of 1260 cu. cm.