Period Panes

In his Penguin Dictionary of Curious and Interesting Numbers (1986), David Wells says that 142857 is “beloved of all recreational mathematicians”. He then says it’s the decimal period of the reciprocal of the fourth prime: “1/7 = 0·142857142857142…” And the reciprocal has maximum period. There are 6 = 7-1 digits before repetition begins, unlike the earlier prime reciprocals:


1/2 = 0·5
1/3 = 0·333...
1/5 = 0·2
1/7 = 0·142857 142857 142...

In other words, all possible remainders appear when you calculate the decimals of 1/7:


1*10 / 7 = 1 remainder 3 → 0·1
3*10 / 7 = 4 remainder 2 → 0·14
2*10 / 7 = 2 remainder 6 → 0·142
6*10 / 7 = 8 remainder 4 → 0·1428
4*10 / 7 = 5 remainder 5 → 0·14285
5*10 / 7 = 7 remainder 1 → 0·142857
1*10 / 7 = 1 remainder 3 → 0·142857 1
3*10 / 7 = 4 remainder 2 → 0·142857 14
2*10 / 7 = 2 remainder 6 → 0·142857 142...

That happens again with 1/17 and 1/19, but Wells says that “surprisingly, there is no known method of predicting which primes have maximum period.” It’s a simple question that involves some deep mathematics. Looking at prime reciprocals is like peering through a small window into a big room. Some things are easy to see, some are difficult and some are presently impossible.

In his discussion of 142857, Wells mentions one way of peering through a period pane: “The sequence of digits also makes a striking pattern when the digits are arranged around a circle.” Here is the pattern, with ten points around the circle representing the digits 0 to 9:

The digits of 1/7 = 0·142857142…


But I prefer, for further peers through the period-panes, to create the period-panes using remainders rather than digits. That is, the number of points around the circle is determined by the prime itself rather than the base in which the reciprocal is calculated:

The remainders of 1/7 = 1, 3, 2, 6, 4, 5…


Period-panes can look like butterflies or bats or bivalves or spiders or crabs or even angels. Try the remainders of 1/13. This prime reciprocal doesn’t have maximum period: 1/13 = 0·076923 076923 076923… So there are only six remainders, creating this pattern:

remainders(1/13) = 1, 10, 9, 12, 3, 4


The multiple 2/13 has different remainders and creates a different pattern:

remainders(2/13) = 2, 7, 5, 11, 6, 8


But 1/17, 1/19 and 1/23 all have maximum period and yield these period-panes:

remainders(1/17) = 1, 10, 15, 14, 4, 6, 9, 5, 16, 7, 2, 3, 13, 11, 8, 12


remainders(1/19) = 1, 10, 5, 12, 6, 3, 11, 15, 17, 18, 9, 14, 7, 13, 16, 8, 4, 2


remainders(1/23) = 1, 10, 8, 11, 18, 19, 6, 14, 2, 20, 16, 22, 13, 15, 12, 5, 4, 17, 9, 21, 3, 7


It gets mixed again with the prime 73, which doesn’t have maximum period and yields a plethora of period-panes (some patterns repeat with different n * 1/73, so I haven’t included them):

remainders(1/73)


remainders(2/73)


remainders(3/73)


remainders(4/73)


remainders(5/73)


remainders(6/73)


remainders(9/73)


remainders(11/73) (identical to pattern of 5/73)


remainders(12/73)


remainders(18/73)


101 yields a plethora of period-panes, but they’re variations on a simple theme. They look like flapping wings in this animated gif:

remainders of n/101 (animated)


The remainders of 137 yield more complex period-panes:

remainders of n/137 (animated)


And what about different bases? Here are period-panes for the remainders of 1/17 in bases 2 to 16:

remainders(1/17) in base 2


remainders(1/17) in b3


remainders(1/17) in b4


remainders(1/17) in b5


remainders(1/17) in b6


remainders(1/17) in b7


remainders(1/17) in b8


remainders(1/17) in b9


remainders(1/17) in b10


remainders(1/17) in b11


remainders(1/17) in b12


remainders(1/17) in b13


remainders(1/17) in b14


remainders(1/17) in b15


remainders(1/17) in b16


remainders(1/17) in bases 2 to 16 (animated)


But the period-panes so far have given a false impression. They’ve all been symmetrical. That isn’t the case with all the period-panes of n/19:

remainders(1/19) in b2


remainders(1/19) in b3


remainders(1/19) in b4 = 1, 4, 16, 7, 9, 17, 11, 6, 5 (asymmetrical)


remainders(1/19) in b5 = 1, 5, 6, 11, 17, 9, 7, 16, 4 (identical pattern to that of b4)


remainders(1/19) in b6


remainders(1/19) in b7


remainders(1/19) in b8


remainders(1/19) in b9


remainders(1/19) in b10 (identical pattern to that of b2)


remainders(1/19) in b11


remainders(1/19) in b12


remainders(1/19) in b13


remainders(1/19) in b14


remainders(1/19) in b15


remainders(1/19) in b16


remainders(1/19) in b17


remainders(1/19) in b18


remainders(1/19) in bases 2 to 18 (animated)


Here are a few more period-panes in different bases:

remainders(1/11) in b2


remainders(1/11) in b7


remainders(1/13) in b6


remainders(1/43) in b6


remainders in b2 for reciprocals of 29, 37, 53, 59, 61, 67, 83, 101, 107, 131, 139, 149 (animated)


And finally, to performativize the pun of “period pane”, here are some period-panes for 1/29, whose maximum period will be 28 (NASA says that the “Moon takes about one month to orbit Earth … 27.3 days to complete a revolution, but 29.5 days to change from New Moon to New Moon”):

remainders(1/29) in b4


remainders(1/29) in b5


remainders(1/29) in b8


remainders(1/29) in b9


remainders(1/29) in b11


remainders(1/29) in b13


remainders(1/29) in b14


remainders(1/29) in various bases (animated)


Blancmange Butterfly

Blancmange butterfly. Is that a ’60s psychedelic band? No, it’s one of the shapes you can get by playing with blancmange curves. As I described in “White Rites”, a blancmange curve is a fractal created by summing the heights of successively smaller and more numerous zigzags, like this:

blanc_all

Zigzags 1 to 10


blancmange_all

Zigzags 1 to 10 (animated)


blanc_solid

Blancmange curve


In the blancmange curves below, the height (i.e., the y co-ordinate) has been normalized so that all the images are the same height:









Construction of a normalized blancmange curve (animated)


This is the solid version:









Solid normalized blancmange curve (animated)


I wondered what happens when you wrap a blancmange curve around a circle. Well, this happens:









Construction of a blancmange circle (animated)


You get what might be called a blancmange butterfly. The solid version looks like this (patterns in the circles are artefacts of the graphics program I used):









Solid blancmange circle (animated)


Next I tried using arcs rather zigzags to construct the blancmange curves and blancmange circles:









Arching blancmange curve (i.e., constructed with arcs) (animated)


And below is the circular version of a blancmange curve constructed with arcs. The arching circular blancmanges look even more like buttocks and then intestinal villi (the fingerlike projections lining our intestines):









Arching blancmange circle (animated)


The variations on blancmange curves don’t stop there — in fact, they’re infinite. Below is a negative arching blancmange curve, where the heights of the original arching blancmange curve are subtracted from the (normalized) maximum height:








Negative arching blancmange curve (animated)


And here’s an arching blancmange curve that’s alternately negative and positive:








Negative-positive arching blancmange curve (animated)


The circular version looks like this:










Negative-positive arching blancmange circle (animated)


Finally, here’s an arching blancmange curve that’s alternately positive and negative:









Positive-negative arching blancmange curve (animated)


And the circular version:











Positive-negative arching blancmange circle (animated)


Elsewhere Other-Accessible…

White Rites — more variations on blancmange curves

We Can Circ It Out

It’s a pretty little problem to convert this triangular fractal…

Sierpiński triangle (Wikipedia)


…into its circular equivalent:

Sierpiński triangle as circle


Sierpiński triangle to circle (animated)


But once you’ve circ’d it out, as it were, you can easily adapt the technique to fractals based on other polygons:

T-square fractal (Wikipedia)

T-square fractal as circle


T-square fractal to circle (animated)


Elsewhere other-accessible…

Dilating the Delta — more on converting polygonic fractals to circles…

Six Mix Trix

Here’s an equilateral triangle divided into six smaller triangles:

Equilateral triangle divided into six irregular triangles (Stage #1)


Now keep on dividing:

Stage #2


Stage #3


Stage #4


Stage #5


Equilateral triangle dividing into six irregular triangles (animated)


But what happens if you divide the triangle, then discard some of the sub-triangles, then repeat? You get a self-similar shape called a fractal:

Divide-and-discard stage #1


Stage #2


Stage #3


Stage #4


Stage #5


Stage #6


Triangle fractal (animated)


Here’s another example:

Divide-and-discard stage #1


Stage #2


Stage #3


Stage #4


Stage #5


Stage #6


Stage #7


Triangle fractal (animated)


You can also delay the divide-and-discard to create a more symmetrical fractal, like this:

Delayed divide-and-discard stage #1


Stage #2


Stage #3


Stage #4


Stage #5


Stage #6


Stage #7


Triangle fractal (animated)


What next? You can use trigonometry to turn the cramped triangle into a circle:

Triangular fractal

Circular fractal
(Open in new window for full image)


Triangle-to-circle (animated)


Here’s another example:

Triangular fractal

Circular fractal


Triangle-to-circle (animated)


And below are some more circular fractals converted from triangular fractals. Some of them look like distorted skulls or transdimensional Lovecraftian monsters:

(Open in new window for full image)


















Previous Pre-Posted

Circus Trix — an earlier look at sextally-divided-equilateral-triangle fractals

Circus Trix

Here’s a trix, or triangle divided into six smaller triangles:

Trix, or triangle divided into six smaller triangles


Now each sub-triangle becomes a trix in its turn:

Trix stage #2


And again:

Trix #3


Trix #4


Trix #5


Trix divisions (animated)


Now try dividing the trix and discarding sub-triangles, then repeating the process. A fractal appears:

Trix fractal #1


Trix fractal #2


Trix fractal #3


Trix fractal #4


Trix fractal #5


Trix fractal #6


Trix fractal #7


Trix fractal (animated)


But what happens if you delay the discarding, first dividing the trix completely into sub-triangles, then dividing completely again? You get a more attractive and symmetrical fractal, like this:

Trix fractal (delayed discard)


And it’s easy to convert the triangle into a circle, creating a fractal like this:

Delayed-discard trix fractal converted into circle


Delayed-discard trix fractal to circular fractal (animated)


Now a trix fractal that looks like a hawk-god:

Trix hawk-god #1


Trix hawk-god #2


Trix hawk-god #3


Trix hawk-god #4


Trix hawk-god #5


Trix hawk-god #6


Trix hawk-god #7


Trix hawk-god (animated)


Trix hawk-god converted to circle


Trix hawk-god to circle (animated)


If you delay the discard, you get this:

Trix hawk-god circle (delayed discard)


And here are more delayed-discard trix fractals:







Various circular trix-fractals (animated)


Post-Performative Post-Scriptum

In Latin, circus means “ring, circle” — the English word “circle” is actually from the Latin diminutive circulus, meaning “little circle”.

Dilating the Delta

A circle with a radius of one unit has an area of exactly π units = 3.141592… units. An equilateral triangle inscribed in the unit circle has an area of 1.2990381… units, or 41.34% of the area of the unit circle.

In other words, triangles are cramped! And so it’s often difficult to see what’s going on in a triangle. Here’s one example, a fractal that starts by finding the centre of the equilateral triangle:

Triangular fractal stage #1


Next, use that central point to create three more triangles:

Triangular fractal stage #2


And then use the centres of each new triangle to create three more triangles (for a total of nine triangles):

Triangular fractal stage #3


And so on, trebling the number of triangles at each stage:

Triangular fractal stage #4


Triangular fractal stage #5


As you can see, the triangles quickly become very crowded. So do the central points when you stop drawing the triangles:

Triangular fractal stage #6


Triangular fractal stage #7


Triangular fractal stage #8


Triangular fractal stage #9


Triangular fractal stage #10


Triangular fractal stage #11


Triangular fractal stage #12


Triangular fractal stage #13


Triangular fractal (animated)


The cramping inside a triangle is why I decided to dilate the delta like this:

Triangular fractal

Circular fractal from triangular fractal


Triangular fractal to circular fractal (animated)


Formation of the circular fractal (animated)


And how do you dilate the delta, or convert an equilateral triangle into a circle? You use elementary trigonometry to expand the perimeter of the triangle so that it lies on the perimeter of the unit circle. The vertices of the triangle don’t move, because they already lie on the perimeter of the circle, but every other point, p, on the perimeter of the triangles moves outward by a fixed amount, m, depending on the angle it makes with the center of the triangle.

Once you have m, you can move outward every point, p(1..i), that lies between p on the perimeter and the centre of the triangle. At least, that’s the theory between the dilation of the delta. In practice, all you need is a point, (x,y), inside the triangle. From that, you can find the angle, θ, and distance, d, from the centre, calculate m, and move (x,y) to d * m from the centre.

You can apply this technique to any fractal created in an equilateral triangle. For example, here’s the famous Sierpiński triangle in its standard form as a delta, then as a dilated delta or circle:

Sierpiński triangle

Sierpiński triangle to circular Sierpiński fractal


Sierpiński triangle to circle (animated)


But why stop at triangles? You can use the same elementary trigonometry to convert any regular polygon into a circle. A square inscribed in a unit circle has an area of 2 units, or 63.66% of the area of the unit circle, so it too is cramped by comparison with the circle. Here’s a square fractal that I’ve often posted before:

Square fractal, jump = 1/2, ban on jumping towards any vertex twice in a row


It’s created by banning a randomly jumping point from moving twice in a row 1/2 of the distance towards the same vertex of the square. When you dilate the fractal, it looks like this:

square_fractal_circ_i0

Circular fractal from square fractal, j = 1/2, ban on jumping towards vertex v(i) twice in a row


Circular fractal from square (animated)


And here’s a related fractal where the randomly jumping point can’t jump towards the vertex directly clockwise from the vertex it’s previously jumped towards (so it can jump towards the same vertex twice or more):

Square fractal, j = 1/2, ban on vertex v(i+1)


When the fractal is dilated, it looks like this:

Circular fractal from square, i = 1


Circular fractal from square (animated)


In this square fractal, the randomly jumping point can’t jump towards the vertex directly opposite the vertex it’s previously jumped towards:

Square fractal, ban on vertex v(i+2)


And here is the dilated version:

Circular fractal from square, i = 2

Circular fractal from square (animated)


And there are a lot more fractals where those came from. Infinitely many, in fact.

The Choice of the Circle

Here’s an elementary mathematical problem: how many ways are there to choose three numbers from a set of six numbers? If the set is (1, 2, 3, 4, 5, 6), these are the possible choices (or combinations):

(1, 2, 3), (1, 2, 4), (1, 2, 5), (1, 2, 6), (1, 3, 4), (1, 3, 5), (1, 3, 6), (1, 4, 5), (1, 4, 6), (1, 5, 6), (2, 3, 4), (2, 3, 5), (2, 3, 6), (2, 4, 5), (2, 4, 6), (2, 5, 6), (3, 4, 5), (3, 4, 6), (3, 5, 6), (4, 5, 6) (c = 20)

So 6C3 = 20 (C stands for “combination”). The general formula is nCr = (n! / (n-r)!) / r!, where n is the number to choose from, r is the number of choices and n! is factorial n, or n multiplied by all numbers less than itself. For example, 6! = 6 * 5 * 4 * 3 * 2 * 1 = 720. When n = 6 and c = 3, 6C3 = (6! / (6-3)!) / 3! = (720 / 6) / 6 = 20.

There isn’t much visual appeal in the choices above, but there’s a simple way to change that. Take the ways of choosing two numbers from a set of ten. They start like this:

(1, 2), (1, 3), (1, 4), (1, 5), (1, 6), (1, 7), (1, 8), (1, 9), (1, 10), (2, 3), (2, 4), (2, 5), (2, 6), (2, 7), (2, 8), (2, 9), (2, 10), (3, 4), (3, 5), (3, 6)…

Suppose each choice represents the midpoint of two points chosen from a set of ten points around a pentagon, so that (1, 2) is half-way between points 1 and 2, (3, 5) is half-way between points 3 and 5, and so on:

pent_10_2

Now take the ways of choosing three numbers from a set of ten:

(1, 2, 3), (1, 2, 4), (1, 2, 5), (1, 2, 6), (1, 2, 7), (1, 2, 8), (1, 2, 9), (1, 2, 10), (1, 3, 4), (1, 3, 5), (1, 3, 6), (1, 3, 7), (1, 3, 8), (1, 3, 9), (1, 3, 10)…

Now the pentagon looks like this, with (1, 2, 3) representing the point midway between 1, 2 and 3, (1, 3, 9) representing the point midway between 1, 3 and 9, and so on:

pent_10_3

Now here are 10C4, 10C5 and 10C6 for the pentagon:

pent_10_4

pent_10_5

pent_10_6

You can also generate the points 5C4 = 5, then add them to the original five points and generate 10C4:

pent4_1

5C4


pent4_2

10C4


And here are 5C5, 6C5 and 12C5:

pent5

Here are 7C7 and 8C8, adding points as for 5C4:

hept7

octo8

And here is 12C6 using a dodecagon:

dodeca_6

And various nCr for dodecagons and other polygons:

various

This method can also be used to represent the partitions of n, or the number of sets whose members sum to n. The partitions of 5 are these:

(5), (4, 1), (3, 2), (3, 1, 1), (2, 2, 1), (2, 1, 1, 1), (1, 1, 1, 1, 1)

There are seven partitions, so p(5) = 7. Partitions start small and get very large, starting with p(1), p(2), p(3) and so on:

1, 2, 3, 5, 7, 11, 15, 22, 30, 42, 56, 77, 101, 135, 176, 231, 297, 385, 490, 627, 792, 1002, 1255, 1575, 1958, 2436, 3010, 3718, 4565, 5604, 6842, 8349, 10143, 12310, 14883, 17977, 21637, 26015, 31185, 37338, 44583, 53174, 63261, 75175, 89134, 105558, 124754, 147273, 173525, 204226, 239943, 281589, 329931, 386155, 451276, 526823, 614154, 715220, 831820, 966467, 1121505, 1300156…

Suppose the partitions of n are treated as sets of points around a polygon with n vertices. Each set is then used to generate the point midway between its members. For example, (5, 4, 4, 2) is one partition of 15 and would represent the point midway between 5, 4, 4 and 2 of a pentadecagon. Here is a graphical representation of p(30):

partition30

Here are graphical representations for the partitions 5 to 15, then 15 to 60 in increments of 5 (15, 20, 25, etc):

partitions5_60

And here are some close-ups for the partitions of 35 and 40:

partitions40

Lette’s Roll

A roulette is a little wheel or little roller, but it’s much more than a game in a casino. It can also be one of a family of curves created by tracing the path of a point on a rotating circle. Suppose a circle rolls around another circle of the same size. This is the resultant roulette:
roulette1

roulette1static
The shape is called a cardioid, because it looks like a heart (kardia in Greek). Now here’s a circle with radius r rolling around a circle with radius 2r:
roulette2

roulette2static

That shape is a nephroid, because it looks like a kidney (nephros in Greek).

This is a circle with radius r rolling around a circle with radius 3r:
roulette3

roulette3static
And this is r and 4r:
roulette4

roulette4static
The shapes above might be called outer roulettes. But what if a circle rolls inside another circle? Here’s an inner roulette whose radius is three-fifths (0.6) x the radius of its rollee:
roulette5

roulette5static
The same roulette appears inverted when the inner circle has a radius two-fifths (0.4) x the radius of the rollee:
roulette5a
But what happens when the circle rolling “inside” is larger than the rollee? That is, when the rolling circle is effectively swinging around the rollee, like a bunch of keys being twirled on an index finger? If the rolling radius is 1.5 times larger, the roulette looks like this:
roulette6
If the rolling radius is 2 times larger, the roulette looks like this:
roulette2over

Here are more outer, inner and over-sized roulettes:

roulette_outer

roulette_inner

roulette_over

And you can have circles rolling inside circles inside circles:

roulette7

roulette0616

roulette0616all

And here’s another circle-in-a-circle in a circle:

roulette07c015c