The TetraMag Puzzle

The TetraMag puzzle is a collection of 216 powerful steel-magnet spheres, which can be arranged into many configurations. The object of the puzzle is to return to an initial position after disassembling the puzzle. Additional constraints can be imposed, such as while disassembling to not cut the puzzle into more than one pieces, but these vary depending on the objective. The most common configuration is the cube configuration, which is shown on the web page link, above.


The puzzle's primary cyclic groups are the groups Z/2mZ=Z2m and Z/3nZ=Z3n, for m=n=3, therefore the puzzle group is isomorphic[2] to the Cyclic Group G of order 216=63=23*33, and hence is abelian and every subgroup is normal and cyclic.

The units of the ring Z216 are the numbers coprime to 216. They are the set:

(Z/216Z)*=Z216*={1,5,7,11,13,17,19,23,25,29,31,35,37,41,43,47,49,53,55,59,61,65,67,71, 73,77,79,83,85,89,91,95,97,101,103,107,109,113,115,119,121,125,127,131,133,137,139,143, 145,149, 151,155,157,161,163,167,169,173,175,179,181,185,187,191,193,197,199,203,205,209,211,215},

which has cardinality φ(216)=72, and forms a group under multiplication modulo 216.

The order of these elements can be found with the following Maple code:


>for n from 1 to N do
> if gcd(n,N)=1 then
> L:=[op(L), n];
> fi;


>for k from 1 to nops(L) do
> r:=L[k];
> G:=[];
> for i from 1 to N do
> if evalb(not `in`(r^i mod N, G)) then
> G:=[op(G), r^i mod N];
> fi;
> od;
> print(G,nops(G));

Since there is no number whose order is 72, there are no primitive roots modulo 216. Indeed, λ(216) = 18|72, where λ is the Carmichael function. This is also seen since 216=63=23*33 is not of the form 2, 4, pk, or 2pk, for odd prime p. Therefore the group (Z/216Z)* is not cyclic.

Since Z/216Z is finitely generated, it satisfies the fundamental theorem of abelian groups, as Z/216Z ~ Z23 ⊕ Z33.

Its cyclic subgroups have order d, with d|216:

> with(numtheory):
> N:=216;
> for m from 0 to 3 do
> for n from 0 to 3 do
> print(`subgroup: Z`,2^m,`+Z`,3^n,`ord`,2^m*3^n,,`index`,N/(2^m*3^n));
> od;
> od;

The above code produces the following table of subgroups:

subgroup H order [G:H] Puzzle piece
e 1 216 Single magnetic bead
Z3 3 72 3 beads forming a line
Z9 9 24 9 beads forming a line
Z27 27 8 27 beads forming a line
Z2 2 108 2 beads forming a line
Z2 ⊕ Z3 6 36 2x3 beads rectangular tile
Z2 ⊕ Z9 18 12 2x9 bead rectangulars tile
Z2 ⊕ Z27 54 4 2x27 beads rectangular tile
Z4 4 54 4 beads forming a line
Z4 ⊕ Z3 12 18 3x4 beads rectangular tile
Z4 ⊕ Z9 36 6 4x9 beads rectangular tile
Z4 ⊕ Z27 108 2 4x27 beads rectangular tile
Z8 8 27 8 beads forming a line
Z8 ⊕ Z3 24 9 8x3 beads rectangular tile
Z8 ⊕ Z9 72 3 8x9 beads rectangular tile
Z8 ⊕ Z27 216 1 8x27 beads rectangular tile

Solving the Puzzle

The puzzle website contains videos which decompose the initial configuration into a variety of shapes. Here's a sequence of transformations, which ends in a single string of magnetic beads and recomposes itself back into a cube without disconnecting all the beads[3]:

Position n How to get to next position:
Z63=Z6⊕Z6⊕Z6 Cut through half of the cube and fold the two resultants into a 3x6x12 block
Z3⊕Z6⊕Z12 Cut through the 6-plane to unfold into a 3x3x24 block
Z3⊕Z3⊕Z24 Cut through the 3-plane to unfold into a 3x72 tile
Z3⊕Z72 Cut through the 3-plane to unfold into a string of 216 continuous beads
Z216 Fold single 216 string alternatively in groups of 12, to get a 12x18 tile[1]
Z12⊕Z18 Divide the 12x18 tile in half, to get a 6x36 tile
Z6⊕Z36 Fold around 6x6 tiles 6 times, to get a 6x6x6 cube
Z6⊕Z6⊕Z6=Z63 Starting position


  1. For an alternate form of re-composition, see this YouTube video.
  2. As the direct product of its primary subgroups Z23 and Z33 with GCD(2,3)=1, which are cyclic.
  3. To cut through blocks and planes of beads, use a credit card or the cutter provided in the box.