## 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.

Analysis

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 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:

>with(numtheory);
>N:=216;
>L:=[];

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

>G:=[];

>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));
>od:

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: