Sprime Time

All fans of recreational math love palindromic numbers. It’s mandatory, man. 101, 727, 532235, 8810188, 1367755971795577631 — I love ’em! But where can you go after palindromes? Well, you can go to palindromes in a higher dimension. Numbers like 101, 727, 532235 and 8810188 are 1-d palindromes. That is, they’re palindromic in one dimension: backwards and forwards. But numbers like 181818189 and 646464640 aren’t palindromic in one dimension. They’re palindromic in two dimensions:


1 8 1
8 9 8
1 8 1

n=181818189


6 4 6
4 0 4
6 4 6

n=646464640



They’re 2-d palindromes or spiral numbers, that is, numbers that are symmetrical when written as a spiral. You start with the first digit on the top left, then spiral inwards to the center, like this for a 9-digit spiral (9 = 3×3):


And this for a 36-digit spiral (36 = 6×6):


Spiral numbers are easy to construct, because you can reflect and rotate the numbers in one triangular slice of the spiral to find all the others:


You could say that the seed for the spiral number above is 7591310652, because you can write that number in descending lines, left-to-right, as a triangle.

Here are some palindromic numbers with nine digits in base 3 — as you can see, some are both palindromic numbers and spiral numbers. That is, some are palindromic in both one and two dimensions:

1  0  1

0  1  0

1  0  1

n=101010101


1  0  1

0  2  0

1  0  1

n=101010102


1  1  1

1  0  1

1  1  1

n=111111110


1  1  1

1  1  1

1  1  1

n=111111111


2  0  2

0  1  0

2  0  2

n=202020201


2  0  2

0  2  0

2  0  2

n=202020202


2  2  2

2  1  2

2  2  2

n=222222221


2  2  2

2  2  2

2  2  2

n=222222222


But palindromic primes are even better than ordinary palindromes. Here are a few 1-d palindromic primes in base 10:

101
151
73037
7935397
97356765379
1091544334334451901
1367755971795577631
70707270707
39859395893
9212129
7436347
166000661
313
929


And after 1-d palindromic primes, you can go to 2-d palindromic primes. That is, to spiral primes or sprimes — primes that are symmetrical when written as a spiral:

3 6 3
6 7 6
3 6 3

n=363636367 (prime)
seed=367 (see definition above)


9 1 9
1 3 1
9 1 9

n=919191913 (prime)
seed=913


3 7 8 6 3 6 8 7 3
7 9 1 8 9 8 1 9 7
8 1 9 0 9 0 9 1 8
6 8 0 5 5 5 0 8 6
3 9 9 5 7 5 9 9 3
6 8 0 5 5 5 0 8 6
8 1 9 0 9 0 9 1 8
7 9 1 8 9 8 1 9 7
3 7 8 6 3 6 8 7 3

n=378636873786368737863687378636879189819189819189819189819090909090909090555555557 (prime)
seed=378639189909557 (l=15)


And why stop with spiral numbers — and sprimes — in two dimensions? 363636367 is a 2-sprime, being palindromic in two dimensions. But the digits of a number could be written to form a symmetrical cube in three, four, five and more dimensions. So I assume that there are 3-sprimes, 4-sprimes, 5-sprimes and more out there. Watch this space.

Solids and Shadows

Front cover of An Adventure in Multidimensional Space by Koji MiyazakiAn Adventure in Multidimensional Space: The Art and Geometry of Polygons, Polyhedra, and Polytopes, Koji Miyazaki (Wiley-Interscience 1987)

Two, three, four – or rather, two, three, ∞. Polygons are closed shapes in two dimensions (e.g., the square), polyhedra closed shapes in three dimensions (the cube), and polytopes closed shapes in four or more (the hypercube). You could spend a lifetime exploring any one of these geometries, but unless you take psychedelic drugs or brain-modification becomes much more advanced, you’ll be able to see only two of them: the geometries of polygons and polyhedra. Polytopes are beyond imagining but you can glimpse their shadows here – literally, because we can represent polytopes by the shadows they cast in 3-space or by the shadows of their shadows in 2-space.

An animated gif of a tesseract

A four-dimensional shape in two dimensions (see Tesseract)

Elsewhere Miyazaki doesn’t have to convey wonder and beauty by shadows: not only is this book full of beautiful shapes, it’s beautifully designed too and the way it alternates black-and-white pages with colour actually increases the power of both. It isn’t restricted to pure mathematics either: Miyazaki also looks at the modern and ancient art and architecture inspired by geometry, and at geometry in nature: the dodecahedral pollen of Gypsophilum elegans (Showy Baby’s-Breath), for example, and the tetrahedral seeds of the Water Chestnut (Trapa spp.), which the Japanese spies and assassins called the ninja used as natural caltrops. A regular tetrahedron always lies on a flat surface with a vertex facing directly upward, and when a pursued ninja scattered the sharply pointed tetrahedral seeds of the Water Chestnut, they were regular enough to injure “the soles of feet of his pursuers”.

Polyhedral plankton by Ernst Haeckel

Polyhedral plankton by Ernst Haeckel

The slightly odd English there is another example of what I like about this book, because it proves the parochialism of language and the universality of mathematics. Miyazaki’s mathematics, as far as I can tell, is flawless, like that of many other Japanese mathematicians, but his self-translated English occasionally isn’t. Japanese mathematics was highly developed before Japan fell under strong Western influence. It would continue to develop if the West disappeared tomorrow. Language is something we have to absorb intuitively from the particular culture we’re born into, but mathematics is learnt and isn’t tied to any particular culture. That’s why it’s accessible in the same way to minds everywhere in the world. Miyazaki’s pictures and prose are an extended proof of all that, and the book is actually more valuable because it was written by a Japanese speaker. I think it’s probably more attractively designed for the same reason: the skill with which the pictures have been selected and laid out reflects something characteristically Japanese. Elegance and simplicity perhaps sum it up, and elegance and simplicity are central to mathematics and some of the greatest art.

An animated gif of an 120-cell

Another four-dimensional shape in two dimensions (see 120-cell)