← The essential feature

A LEGO notebook ·

915 million

Six identical 2×4 bricks can be put together 915,103,765 ways. For thirty years, the number LEGO quoted was 102,981,500. That's nine times too few. Where were the other 800 million?

The count here is the one Søren Eilers, a Copenhagen mathematician, finished in 2004. Bricks are all one colour and stacked in layers, and every brick clicks to at least one other. Two structures count as the same if you can turn one into the other.

Step 1 · Two bricks

The hard part is sameness

Put one brick on another and there are 46 places the top one can sit: 21 squared up with the brick below, 25 crossed over it. But a structure doesn't know which way it faces. Lay the bottom brick lengthwise and the only turn left that keeps it there is a half turn. Spin the pair half a turn on the table and most placements become another placement. Same object, two placements.

1aPick a placement and see its twin. Then pair them all up.1x1x

as placed
↻half
turn
after a half turn
Fig. 1. A half turn sends each placement to its twin. 44 placements pair up into 22 structures. The two placements centred both ways (yellow dots) are their own twins. 22 + 2 = 24.

Sameness is what makes counting hard. For towers, arithmetic can handle it.

Step 2 · Towers

LEGO's 1974 number, rebuilt

In May 1974, LEGO's in-house newsletter Klodshans printed a count of towers: six bricks, each sitting on the one below. Every step up has the same 46 choices, so the count is a power of 46. A half turn pairs the towers up again. A tower is its own twin only if every brick is centred, and there are two ways to do that at each step.

2aPick a height and watch the tower go up one choice at a time.6x 2×4

Fig. 2. Towers of n bricks: 46n−1 placements, of which 2n−1 are their own twin. Klodshans gave 102,981,500 for six. Eilers points out it is off by four and suggests the calculator didn't have room for nine digits. Jørgen Kirk Kristiansen, who did the sum, meant towers only; the number later got quoted as the total.

But a tower is only the tallest kind of structure. And towers get rarer with every brick.

Step 3 · Not just towers

LEGO counted 11% of them

Bricks can also sit side by side, held together by a brick across them, above or below. Sort the structures by how many layers tall they are. At three bricks, towers are two thirds of everything. Each extra brick roughly halves their share, and at six bricks the towers LEGO counted are 11%.

3aEach bar is every structure of that many bricks, by height. Tap any slice to build an example.

Fig. 3. Structures by number of layers. Six bricks: Eilers' published breakdown. Three to five bricks: counted for this page with the method in step 4. Yellow: towers, the only kind LEGO counted in 1974.

Arithmetic can't reach the other 89%. So you have to build them all, and count as you go.

Step 4 · Count them yourself

Build everything, and file each one facing the same way

Start from every structure with one brick fewer. Try every spot where a new brick could click on. Many results are structures you already have, seen from another side. So turn each one to a standard position before you file it, and keep one of each.

The standard position is the only clever part. Write the structure down as a list: each brick's layer, then its position, then which way it runs. Sort the list. Of the structure's four quarter turns, keep the one whose list comes first, the way you'd alphabetize words.

4aOne structure, four quarter turns. The yellow one gets filed; the underlined line is where each other list loses.

4bNow count. Each run starts from a single brick.

0placements tried
0different structures kept
–seconds
Fig. 4. The count runs in your browser, one batch at a time. Eilers' published counts: 24, 1,560, 119,580. Five bricks means keeping about ten million structures in memory, more than a web page should ask for. The same method as a plain script on a laptop gives 10,166,403 in about two minutes.

That's the whole method. At three bricks, you can look at everything it finds.

Step 5 · All of them

Every three-brick structure, all 1,560

This is what the three-brick count produces, built in your browser from nothing but the rules. The towers are the 1,060 that step 2's arithmetic could reach. The other 500 have two bricks side by side, and no power of 46 finds them.

5aTap any structure to look at it closely.3x 2×4

Fig. 5. Every contiguous structure of three identical 2×4 bricks, counted once however it is turned. Bottom-layer bricks are dark so the layers read.

Three bricks took 3,276 tries; four took 285,172. Why does each brick cost so much more than the last?

Step 6 · Why it explodes

Every brick multiplies, and the multiplier keeps growing

A new brick can click onto any brick already there, above or below, in up to 46 spots each side. So every brick multiplies the count, and the bigger the structure, the more spots there are. Mathematicians have kept going: eight bricks in 2006, nine in 2014, ten in 2018, and eleven this month.

6aEvery count anyone has finished, one to eleven bricks. Tap a column for the exact number.

6bThe multiplier for each added brick, and where it is proven to end up.

Fig. 6. Counts from OEIS A112389: one to six bricks by Eilers and Abrahamsen (2004); seven by Eilers; eight by Eilers (2006), nine by Johan Nilsson (2014), ten by Matthias Simon (2018), eleven by Eilers (October 2026). Bounds: Durhuus and Eilers (2005) prove the multiplier settles between 78.32 and 191.35, and guessed it is close to 100.

At ten bricks the multiplier passes 100, right where Durhuus and Eilers guessed it would settle, and at eleven it is still creeping up. Eleven bricks give 8,364,925,094,730,088,313 structures. Eilers estimates that the count for 25 bricks is a 47-digit number, and that finishing it the same way would take about 1041 years.

LEGO counted the 11% that arithmetic could reach. The rest took a computer, and by 25 bricks no computer will finish.

More LEGO notebooks

Sources and method

Eilers, A LEGO counting problem: definitions, counts by height for six bricks, the 1974 Klodshans figure, and timings · Durhuus & Eilers, On the entropy of LEGO (2005): bounds 78.32 and 191.35, best guess near 100 · OEIS A112389 · Abrahamsen & Eilers, On the asymptotic enumeration of LEGO structures, Experimental Mathematics 20 (2011)
Counts for three to five bricks, and their breakdown by height, were recomputed for this page by growing structures one brick at a time and filing each in its standard position; they match the published totals exactly.
LEGO® is a trademark of the LEGO Group, which does not sponsor, authorize or endorse this page.

← Back to The essential feature