Spijit

The only two digits found in all standard bases are 1 and 0. But they behave quite differently. Suppose you take the integers 1 to 100 and compare the number of 1s and 0s in the representation of each integer, n, in bases 2 to n-1. For example, 10 would look like this:

1010 in base 2
101 in base 3
22 in base 4
20 in base 5
14 in base 6
13 in base 7
12 in base 8
11 in base 9

So there are nine 1s and four 0s. If you check 1 to 100 using this all-base function, the count of 1s goes like this:

1, 1, 2, 3, 5, 5, 8, 5, 9, 9, 11, 10, 15, 12, 14, 13, 15, 12, 17, 14, 20, 19, 20, 15, 23, 19, 22, 22, 25, 24, 31, 21, 25, 24, 24, 27, 33, 27, 31, 29, 34, 29, 36, 30, 34, 35, 34, 30, 40, 33, 36, 35, 38, 34, 42, 37, 43, 40, 41, 37, 48, 39, 42, 42, 44, 43, 48, 43, 47, 46, 51, 42, 53, 44, 48, 50, 51, 50, 55, 48, 59, 55, 55, 54, 64, 57, 57, 55, 60, 57, 68, 60, 64, 63, 64, 59, 68, 58, 61, 63.

And the count of 0s goes like this:

0, 1, 0, 2, 1, 2, 0, 4, 4, 4, 2, 5, 1, 2, 2, 7, 4, 8, 4, 7, 4, 3, 1, 8, 4, 4, 6, 8, 4, 7, 1, 10, 8, 7, 7, 12, 5, 6, 5, 10, 4, 8, 2, 6, 7, 4, 2, 12, 6, 9, 7, 8, 4, 11, 6, 10, 5, 4, 2, 12, 2, 3, 5, 14, 11, 13, 7, 10, 8, 11, 5, 17, 7, 8, 10, 10, 8, 10, 4, 13, 12, 10, 8, 16, 8, 7, 7, 12, 6, 14, 6, 8, 5, 4, 4, 16, 6, 10, 11, 15.

The bigger the numbers get, the bigger the discrepancies get. Sometimes the discrepancy is dramatic. For example, suppose you represented the prime 1014719 in bases 2 to 1014718. How 0s would there be? And how many 1s? There are exactly nine zeroes:

1014719 = 11110111101110111111 in base 2 = 1220112221012 in base 3 = 40B27B in base 12 = 1509CE in base 15 = 10[670] in base 1007.

But there are 507723 ones. The same procedure applied to the next integer, 1014720, yields 126 zeroes and 507713 ones. However, there is a way to see that 1s and 0s in the all-base representation are behaving in a similar way. To do this, imagine listing the individual digits of n in bases 2 to n-1 (or just base 2, if n <= 3). When the digits aren’t individual they look like this:

1 = 1 in base 2
2 = 10 in base 2
3 = 11 in base 2
4 = 100 in base 2; 11 in base 3
5 = 101 in base 2; 12 in base 3; 11 in base 4
6 = 110 in base 2; 20 in base 3; 12 in base 4; 11 in base 5
7 = 111 in base 2; 21 in base 3; 13 in base 4; 12 in base 5; 11 in base 6
8 = 1000 in base 2; 22 in base 3; 20 in base 4; 13 in base 5; 12 in base 6; 11 in base 7
9 = 1001 in base 2; 100 in base 3; 21 in base 4; 14 in base 5; 13 in base 6; 12 in base 7; 11 in base 8
10 = 1010 in base 2; 101 in base 3; 22 in base 4; 20 in base 5; 14 in base 6; 13 in base 7; 12 in base 8; 11 in base 9

So the list would look like this:

1, 1, 0, 1, 1, 1, 0, 0, 1, 1, 1, 0, 1, 1, 2, 1, 1, 1, 1, 0, 2, 0, 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, 3, 1, 2, 1, 1, 1, 0, 0, 0, 2, 2, 2, 0, 1, 3, 1, 2, 1, 1, 1, 0, 0, 1, 1, 0, 0, 2, 1, 1, 4, 1, 3, 1, 2, 1, 1, 1, 0, 1, 0, 1, 0, 1, 2, 2, 2, 0, 1, 4, 1, 3, 1, 2, 1, 1

Suppose that these digits are compared against the squares of a counter-clockwise spiral on a rectangular grid. If the spiral digit is equal to 1, the square is filled in; if the spijit is not equal to 1, the square is left blank. The 1-spiral looks like this:
1spiral
Now try zero. If the spijit is equal to 0, the square is filled in; if not, the square is left blank. The 0-spiral looks like this:
0spiral
And here’s an animated gif of the n-spiral for n = 0..9:
animspiral

Priamonds and Pearls

Interesting patterns emerge when primes are represented as white blocks in a series of n-width left-right lines laid vertically, one atop the other. When the line is five blocks wide, the patterns look like this (the first green block is 1, followed by primes 2, 3 and 5, then 7 in the next line):
5line

(Click for larger version)

Right at the bottom of the first column is an isolated prime diamond, or priamond (marked with a green block). It consists of the four primes 307-311-313-317, where the three latter primes equal 307 + 4 and 6 and 10, or 307 + 5-1, 5+1 and 5×2 (the last prime in the first column is 331 and the first prime in the second is 337). About a third of the way down the first column is a double priamond, consisting of 97, 101, 103, 107, 109 and 113. For a given n, then, a priamond is a set of primes, p1, p2, p3 and p4, such that p2 = p1 + n-1, p3 = p + n+1 and p4 = p1 + 2n.

There are also fragments of pearl-necklace in the columns. One is above the isolated priamond. It consists of four prime-blocks slanting from left to right: 251-257-263-269, or 251 + 6, 12 and 18. A prearl-necklace, then, is a set of primes, p1, p2, p3…, such that p2 = p1 + n+i, p3 = p + 2(n+i)…, where i = +/-1. Now here are the 7-line and 9-line:

7line

Above: 7-line for primes

9line

Above: 9-line for primes

In the 9-line, you can see a prime-ladder marked with a red block. It consists of the primes 43-53-61-71-79-89-97-107, in alternate increments of 10 and 8, or 9+1 and 9-1. A prime-ladder, then, is a set of primes, p1, p2, p3, p4…, such that p2 = p1 + n+1, p3 = p + 2n, p3 = p + 3n+1…

And here is an animated gif of lines 5 through 51:

lines5to51

(Click or open in new window for larger version or if file fails to animate)

Hex Appeal

A polyiamond is a shape consisting of equilateral triangles joined edge-to-edge. There is one moniamond, consisting of one equilateral triangle, and one diamond, consisting of two. After that, there are one triamond, three tetriamonds, four pentiamonds and twelve hexiamonds. The most famous hexiamond is known as the sphinx, because it’s reminiscent of the Great Sphinx of Giza:

sphinx_hexiamond

It’s famous because it is the only known pentagonal rep-tile, or shape that can be divided completely into smaller copies of itself. You can divide a sphinx into either four copies of itself or nine copies, like this (please open images in a new window if they fail to animate):

sphinx4

sphinx9

So far, no other pentagonal rep-tile has been discovered. Unless you count this double-triangle as a pentagon:

double_triangle_rep-tile

It has five sides, five vertices and is divisible into sixteen copies of itself. But one of the vertices sits on one of the sides, so it’s not a normal pentagon. Some might argue that this vertex divides the side into two, making the shape a hexagon. I would appeal to these ancient definitions: a point is “that which has no part” and a line is “a length without breadth” (see Neuclid on the Block). The vertex is a partless point on the breadthless line of the side, which isn’t altered by it.

But, unlike the sphinx, the double-triangle has two internal areas, not one. It can be completely drawn with five continuous lines uniting five unique points, but it definitely isn’t a normal pentagon. Even less normal are two more rep-tiles that can be drawn with five continuous lines uniting five unique points: the fish that can be created from three equilateral triangles and the fish that can be created from four isosceles right triangles:

equilateral_triangle_fish_rep-tile

right_triangle_fish_rep-tile

Hextra Texture

A hexagon can be divided into six equilateral triangles. An equilateral triangle can be divided into a hexagon and three more equilateral triangles. These simple rules, applied again and again, can be used to create fractals, or shapes that echo themselves on smaller and smaller scales.

hextriangle

hextriangle2

hextriangle1


Previously pre-posted (please peruse):

Fractal Fourmulas

Fractal Fourmulas

A square can be divided into four right triangles. A right triangle can be divided into a square and two more right triangles. These simple rules, applied again and again, can be used to create fractals, or shapes that echo themselves on smaller and smaller scales.

trisquare5

trisquare3

trisquare4

trisquare2

trisquare6

trisquare7

trisquare1

Go with the Floe

Fractals are shapes that contain copies of themselves on smaller and smaller scales. There are many of them in nature: ferns, trees, frost-flowers, ice-floes, clouds and lungs, for example. Fractals are also easy to create on a computer, because you all need do is take a single rule and repeat it at smaller and smaller scales. One of the simplest fractals follows this rule:

1. Take a line of length l and find the midpoint.
2. Erect a new line of length l x lm on the midpoint at right angles.
3. Repeat with each of the four new lines (i.e., the two halves of the original line and the two sides of the line erected at right angles).

When lm = 1/3, the fractal looks like this:

stick1

(Please open image in a new window if it fails to animate)

When lm = 1/2, the fractal is less interesting:

stick2

But you can adjust rule 2 like this:

2. Erect a new line of length l x lm x lm1 on the midpoint at right angles.

When lm1 = 1, 0.99, 0.98, 0.97…, this is what happens:

stick3

The fractals resemble frost-flowers on a windowpane or ice-floes on a bay or lake. You can randomize the adjustments and angles to make the resemblance even stronger:

frostfloe

Ice floes (see Owen Kanzler)

Ice floes (see Owen Kanzler)

Frost on window (see Kenneth G. Libbrecht, )

Frost on window (see Kenneth G. Libbrecht)

Persecution Complex

Imagine four mice sitting on the corners of a square. Each mouse begins to run towards its clockwise neighbour. What happens? This:

Four mice chasing each other

Four mice chasing each other


The mice spiral to the centre and meet, creating what are called pursuit curves. Now imagine eight mice on a square, four sitting on the corners, four sitting on the midpoints of the sides. Each mouse begins to run towards its clockwise neighbour. Now what happens? This:

Eight mice chasing each other

Eight mice chasing each other


But what happens if each of the eight mice begins to run towards its neighbour-but-one? Or its neighbour-but-two? And so on. The curves begin to get more complex:

square+midpoint+2


(Please open the following image in a new window if it fails to animate.)

square+midpoint+3


You can also make the mice run at different speeds or towards neighbours displaced by different amounts. As these variables change, so do the patterns traced by the mice:

• Continue reading Persecution Complexified

O Apollo

One of Swinburne’s most powerful, but least-known, poems is “The Last Oracle”, from Poems and Ballads, Second Series (1878). A song in honour of the god Apollo, it begins in lamentation:

Years have risen and fallen in darkness or in twilight,
   Ages waxed and waned that knew not thee nor thine,
While the world sought light by night and sought not thy light,
   Since the sad last pilgrim left thy dark mid shrine.
Dark the shrine and dumb the fount of song thence welling,
   Save for words more sad than tears of blood, that said:
Tell the king, on earth has fallen the glorious dwelling,
   And the watersprings that spake are quenched and dead.
Not a cell is left the God, no roof, no cover
   In his hand the prophet laurel flowers no more.

And ends in exultation:

         For thy kingdom is past not away,
            Nor thy power from the place thereof hurled;
         Out of heaven they shall cast not the day,
            They shall cast not out song from the world.
         By the song and the light they give
         We know thy works that they live;
         With the gift thou hast given us of speech
         We praise, we adore, we beseech,
         We arise at thy bidding and follow,
            We cry to thee, answer, appear,
   O father of all of us, Paian, Apollo,
            Destroyer and healer, hear! (“The Last Oracle”)

The power, grandeur and beauty of this poem remind me of the music of Beethoven. Swinburne is also, on a smaller scale and in a different medium, one of the geniuses of European art. He and Beethoven were both touched by Apollo, but Apollo was more than the god of music and poetry: he also presided mathematics. But then mathematics is much more visible, or audible, in music and poetry than it is in other arts. Rhythm, harmony, scansion, melody and rhyme are mathematical concepts. Music is built of notes, poetry of stresses and rhymes, and the rules governing them are easier to formalize than those governing, say, sculpture or prose.  Nor do poetry and music have to make sense or convey explicit meaning like other arts. That’s why I think a shape like this is closer to poetry or music than it is to painting:

Apollonian gasket (Wikipedia)

(Image from Wikipedia.)

This shape has formal structure and beauty, but it has no explicit meaning. Its name has a divine echo: the Apollonian gasket or net, named after the Greek mathematician Apollonius of Perga (c.262 BC–c.190 BC), who was named after Apollo, god of music, poetry and mathematics. The Apollonian gasket is a fractal, but the version above is not as fractal as it could be. I wondered what it would look like if, like fleas preying on fleas, circles appeared inside circles, gaskets within gaskets. I haven’t managed to program the shape properly yet, but here is my first effort at an Intra-Apollonian gasket:

Apollonian gasket

(If the image does not animate or looks distorted, please try opening it in a new window)

When the circles are solid, they remind me of ice-floes inside ice-floes:

Apollonian gasket (solid)

Simpler gaskets can be interesting too:

five-circle gasket


five+four-circle gasket


nine-circle gasket

Tri Again

All roads lead to Rome, so the old saying goes. But you may get your feet wet, so try the Sierpiński triangle instead. This fractal is named after the Polish mathematician Wacław Sierpiński (1882-1969) and quite a few roads lead there too. You can create it by deleting, jumping or bending, inter alia. Here is method #1:

Sierpinski middle delete

Divide an equilateral triangle into four, remove the central triangle, do the same to the new triangles.

Here is method #2:

Sierpinski random jump

Pick a corner at random, jump half-way towards it, mark the spot, repeat.

And here is method #3:

Sierpinski arrowhead

Bend a straight line into a hump consisting of three straight lines, then repeat with each new line.

Each method can be varied to create new fractals. Method #3, which is also known as the arrowhead fractal, depends on the orientation of the additional humps, as you can see from the animated gif above. There are eight, or 2 x 2 x 2, ways of varying these three orientations, so eight fractals can be produced if the same combination of orientations is kept at each stage, like this (some are mirror images — if an animated gif doesn’t work, please open it in a new window):

arrowhead1

arrowhead2

arrowhead3

arrowhead4

arrowhead5

If different combinations are allowed at different stages, the number of different fractals gets much bigger:

• Continuing viewing Tri Again.