5x5x5 Pentacube Puzzle

Initializing live version
Download to Desktop

Requires a Wolfram Notebook System

Interact on desktop, mobile and cloud with the free Wolfram Player or other Wolfram Language products.

In this puzzle you are given 25 pentacubes, each consisting of a 1x1x3 bar joined to a 1x1x2 bar.


Their shapes are identical up to mirroring, but each has a different color.

Your task is to fill a 5x5x5 cube with those 25 pentacubes without gaps or overlaps.


Contributed by: Karl Scherer (February 2009)
Open content licensed under CC BY-NC-SA




The buttons for mirroring, rotation, and translation let you place the pentacubes in any way you want.

Once you have placed a pentacube, hit the "create next" button. This will cause another pentacube to appear outside the 5x5x5 box.

This new pentacube will then be the one you are manipulating. However, you can select to manipulate any of the other visible pentacubes—simply click the corresponding colored button. If you select a pentacube number which has not been created yet, nothing will happen.

Click "delete current" to delete the current pentacube. Click "show partial" to show all pentacubes up to the current one. So if you have positioned 15 pentacubes and you want to see the buildup of the first six pentacubes, simply click the orange button (which carries the number 6) and select "show partial". Click "show partial again to switch it off.

Click "reset" to recreate the start position. Click "show solution" to see a solution.

Other Controls

You can separately select to show the floor, the wire frame, or the colored arrows that mark the three coordinate axes (red = axis, blue = axis, green = axis).


The system does not check whether any two pentacubes are overlapping.


This Demonstration is based on the article by the author, "The Primes of a Certain Pentacube", Journal of Recreational Mathematics, 26(1), 1994 pp. 1–2.

Tiling the 5x5x5 cube with the pentacubes given here is also one of the topics of the author's Zillions game "Comacube", which contains 11 such puzzles using various pentacubes.

It is easy to make the pentacubes from wood, so you can try to solve the problem hands-on as well.

Feedback (field required)
Email (field required) Name
Occupation Organization
Note: Your message & contact information may be shared with the author of any specific Demonstration for which you give feedback.