The Wyrm Ferns

A fern is a fractal, a shape that contains copies of itself at smaller and smaller scales. That is, part of a fern looks like the fern as a whole:

Fern as fractal (source)


Millions of years after Mother Nature, man got in on the fract, as it were:

The Sierpiński triangle, a 2d fractal


The Sierpiński triangle is a fractal created in two dimensions by a point jumping halfway towards one or another of the three vertices of a triangle. And here is a fractal created in one dimension by a point jumping halfway towards one or another of the two ends of a line:

A 1d fractal


In one dimension, the fractality of the fractal isn’t obvious. But you can try draggin’ out (or dragon out) the fractality of the fractal by ferning the wyrm, as it were. Suppose that after the point jumps halfway towards one or another of the two points, it’s rotated by some angle around the midpoint of the two original points. When you do that, the fractal becomes more and more obvious. In fact, it becomes what’s called a dragon curve (in Old English, “dragon” was wyrm or worm):

Fractal with angle = 5°


Fractal 10°


Fractal 15°


Fractal 20°


Fractal 25°


Fractal 30°


Fractal 35°


Fractal 40°


Fractal 45°


Fractal 50°


Fractal 55°


Fractal 60°


Fractal 0° to 60° (animated at ezGif)


But as the angle gets bigger, an interesting aesthetic question arises. When is the ferned wyrm, the dragon curve, at its most attractive? I’d say it’s when angle ≈ 55°:

Fractal 50°


Fractal 51°


Fractal 52°


Fractal 53°


Fractal 54°


Fractal 55°


Fractal 56°


Fractal 57°


Fractal 58°


Fractal 59°


Fractal 60°


Fractal 50° to 60° (animated)


At angle >= 57°, I think the dragon curve starts to look like some species of bristleworm, which are interesting but unattractive marine worms:

A bristleworm, Nereis virens (see polychaete at Wikipedia)


Finally, here’s what the ferned wyrm looks like in black-and-white and when it’s rotating:

Fractal 0° to 60° (b&w, animated)


Fractal 56° (rotating)


Fractal 56° (b&w, rotating)


Double fractal 56° (b&w, rotating)


Previously Pre-Posted (Please Peruse)…

Curvous Energy — a first look at dragon curves
Back to Drac’ — another look at dragon curves

Graph durch Euler

This is the famous Ulam spiral, in which prime numbers are represented on filled squares on a square spiral:

The Ulam spiral


I like the way the spiral sits between chaos and calm. It’s not wholly random and it’s not wholly regular — it’s betwixt and between. You get a similar chaos-and-calm vibe from a graph for a function called Euler phi. And primes are at work there too. Here’s the graph from Wikipedia:

Graph of eulerphi(n) = φ(n) (see Euler’s totient function)


But what is the Euler phi function? For any integer n, eulerphi(n) gives you the count of numbers < n that are relatively prime to n. That is, the count of numbers < n that have no common factors with n other than one. You can see how eulerphi(n) works by considering whether you can simplify the fraction a/b, where a = 1..n-1 and b = n:

φ(6) = 2
1/6 (1)
2/6 → 1/3
3/6 → 1/2
4/6 → 2/3
5/6, ∴ φ(6) = 2


φ(7) = 6
1/7 (1)
2/7 (2)
3/7 (3)
4/7 (4)
5/7 (5)
6/7, ∴ φ(7) = 6


φ(12) = 4
1/12 (1)
2/12 → 1/6
3/12 → 1/4
4/12 → 1/3
5/12 (2)
6/12 → 1/2
7/12 (3)
8/12 → 2/3
9/12 → 3/4
10/12 → 5/6
11/12, ∴ φ(12) = 4


φ(13) = 12
1/13 (1)
2/13 (2)
3/13 (3)
4/13 (4)
5/13 (5)
6/13 (6)
7/13 (7)
8/13 (8)
9/13 (9)
10/13 (10)
11/13 (11)
12/13, ∴ φ(13) = 12


As you can see, eulerphi(n) = n-1 for primes. Now you know what the top line of the Eulerphi graph is. It’s the primes. Here’s a bigger version of the graph:

Graph of eulerphi(n) = φ(n)


Unlike the Ulam spiral, however, the Eulerphi graph is cramped. But it’s easy to stretch it. You can represent φ(n) as a fraction between 0 and 1 like this: phifrac(n) = φ(n) / (n-1). Using phifrac(n), you can create Eulerphi bands, like this:

Eulerphi band, n <= 1781


Eulerphi band, n <= 3561


Eulerphi band, n <= 7121


Eulerphi band, n <= 14241


Or you can create Eulerphi discs, like this:

Eulerphi disc, n <= 1601


Eulerphi disc, n <= 3201


Eulerphi disc, n <= 6401


Eulerphi disc, n <= 12802


Eulerphi disc, n <= 25602


But what is the bottom line of the Eulerphi bands and inner ring of the Eulerphi discs, where φ(n) is smallest relative to n? Well, the top line or outer ring is the primes and the bottom line or inner ring is the primorials (and their multiples). The function primorial(n) is the multiple of the first n primes:

primorial(1) = 2
primorial(2) = 2*3 = 6
primorial(3) = 2*3*5 = 30
primorial(4) = 2*3*5*7 = 210
primorial(5) = 2*3*5*7*11 = 2310
primorial(6) = 2*3*5*7*11*13 = 30030
primorial(7) = 2*3*5*7*11*13*17 = 510510
primorial(8) = 2*3*5*7*11*13*17*19 = 9699690
primorial(9) = 2*3*5*7*11*13*17*19*23 = 223092870
primorial(10) = 2*3*5*7*11*13*17*19*23*29 = 6469693230


Here are the numbers returning record lows for φfrac(n) = φ(n) / (n-1):

φ(4) = 2 (2/3 = 0.666…)
4 = 2^2
φ(6) = 2 (2/5 = 0.4)
6 = 2.3
φ(12) = 4 (4/11 = 0.363636…)
12 = 2^2.3
[…]
φ(30) = 8 (8/29 = 0.275862…)
30 = 2.3.5
φ(60) = 16 (16/59 = 0.27118…)
60 = 2^2.3.5
[…]
φ(210) = 48 (48/209 = 0.229665…)
210 = 2.3.5.7
φ(420) = 96 (96/419 = 0.2291169…)
420 = 2^2.3.5.7
φ(630) = 144 (144/629 = 0.228934…)
630 = 2.3^2.5.7
[…]
φ(2310) = 480 (480/2309 = 0.2078822…)
2310 = 2.3.5.7.11
φ(4620) = 960 (960/4619 = 0.20783719…)
4620 = 2^2.3.5.7.11
[…]
30030 = 2.3.5.7.11.13
φ(60060) = 11520 (11520/60059 = 0.191811385…)
60060 = 2^2.3.5.7.11.13
φ(90090) = 17280 (17280/90089 = 0.1918103209…)
90090 = 2.3^2.5.7.11.13
[…]
φ(510510) = 92160 (92160/510509 = 0.18052571061…)
510510 = 2.3.5.7.11.13.17
φ(1021020) = 184320 (184320/1021019 = 0.18052553…)
1021020 = 2^2.3.5.7.11.13.17
φ(1531530) = 276480 (276480/1531529 = 0.180525474868579…)
1531530 = 2.3^2.5.7.11.13.17
φ(2042040) = 368640 (368640/2042039 = 0.18052544540040616…)
2042040 = 2^3.3.5.7.11.13.17

Scout the Routes

Triangles? Yes. Squares? No. If you scout the routes with a triangle, you get a beautiful fractal. If you scout the routes with a square, you don’t. Here’s what you get with a triangle:

A Sierpiński triangle


But how do you scout the routes? (That phrase works best in the American dialects where “scout” rhymes with “route”.) Simple: you mark the final positions reached when a point traces all possible ways of jumping, say, eight times 1/2-way towards the vertices of a polygon. Here’s an animation of a point scouting the routes of eight jumps towards the vertices of a triangle (it starts each time at the center):

Creating a Sierpiński triangle by scouting the routes (animated at Ezgif)


If you scout the routes with a square, you don’t get a fractal. Instead, the interior of the square fills evenly (and boringly) with the end-points of the routes:

Scouting the routes with a square (animated at Ezgif)


But you can create fractals with a square if you out routes as you scout routes. That is, if you exclude some routes and don’t mark their end-points. One way to do this is to compare the proposed next jump-vertex (vertex-jumped-towards) with the previous jump-vertex. For example, if the proposed jump-vertex, jv[t], is the same as the previous jump-vertex, jv[t-1], you don’t jump towards jv[t] or you jump towards it in a different way. The test is jv[t] = jv[t-1] + vi. If vi = 0 and you jump towards the clockwise neighbor of jv when the test is true, you get a fractal looking like this:

vi = 0, action = jv → jv + 1


Here’s the fractal if you jump towards the clockwise-neighbor-but-one when the test is true:

vi = 0, action = jv + 2


Now try varying the vi of the jv[t-1] + vi:

vi = 2, action = jv + 2


vi = 2, action = jv + 1


vi = 3, action = jv + 1


Or what about jumping in a different way towards jv when the test is true? If you jump 2/3 of the way rather 1/2, you get his fractal:

vi = 2, action = jump 2/3


And if you jump 4/3 of the way (i.e., you overshoot the vertex jv), you get this fractal:

vi = 0, action = jump 4/3rds to vertex


vi = 0, jump 4/3 (guide-square removed)


vi = 2, jump 4/3rds (guide-square removed)


And in this fractal the point jumps 2/3 of the way to the center of the square when the test is true:

vi = 2, action = jump 2/3rds of way to center of square


But why apply only one test to jv[1] and use only when one alternative jump? If jv[t] = jv[t-1] + 1 or jv[t] = jv[t-1] + 3, jv[t] becomes jv[t]+1 or jv[t]+3, respectively, you get this fractal:

vi = 1, jv + 1; vi = 3, jv + 3


Here are more fractals created by single and double tests:

vi = 1, jv + 1


vi = 0, jump 2/3


vi = 0, jump towards center 2/3rds


vi = 1, jump-center 2/3


vi = 2, jump 1/3; vi = 3, jump 1/1 (i.e, 1)


vi = 0, jv + 2; vi = 2, jump-center 1/2


vi = 0, jv + 2; vi = 2, jump-center 2/3


vi = 0, jv + 2; vi = 2, jump-center 4/3


vi = 0, jv + 1; vi = 2, jump 2/3


vi = 0, jv + 2; vi = 2, jump 2/3


vi = 0, jump 4/3; vi = 2, jv + 2


vi = 0, jump 2/3; vi = 2, jv + 1


vi = 0, jump 4/3; vi = 1, jv + 2


vi = 0, jump 2/3; vi = 2, jump 1/3


vi =0, jump 1/3; vi = 2, jump 2/3


vi = 0, jump 0/1 (i.e, 0); vi = 2, jump 1/3


Primal Pellicles

Numbers have thin skins. And they’re easily replaced. Take 71624133. Here it is permuting its pellicles:

71624133 in base 10 = 100010001001110010111000101 in base 2 = 11222202212211200 in b3 = 10101032113011 in b4 = 121313433013 in b5 = 11035053113 in b6 = 1526536500 in b7 = 421162705 in b8 = 158685750 in b9 = 374802A9 in b11 = 1BBA1199 in b12 = 11AB9B59 in b13 = 9726137 in b14 = 644BE73 in b15 = F3855B7 in b16

But if digits are the skin of 71624133, what are its bones? Well, you could say the skeleton of a number, something that doesn’t change from base to base, is its prime factorization:

71624133 = 32 × 72 × 162413

But the primes themselves are numbers, so they’re wearing pellicles too. And it turns out that, in base 10, the pellicles of the prime factors of 71624133 match the pellicle of 71624133 itself:

71624133 = 32.72.162413

Here’s a list of primal pellicles in base 10:

735 = 3.5.72
3792 = 24.3.79
1341275 = 52.13.4127
13115375 = 53.7.13.1153
22940075 = 52.229.4007
29373375 = 3.53.29.37.73
71624133 = 32.72.162413
311997175 = 52.7.172.31.199
319953792 = 27.3.53.79.199
1019127375 = 32.53.7.127.1019
1147983375 = 3.53.7.11.83.479
1734009275 = 52.173.400927
5581625072 = 24.5581.62507
7350032375 = 53.7.23.73.5003
17370159615 = 34.5.17.59.61.701
33061224492 = 22.33.306122449
103375535837 = 72.37.103.553583
171167303912 = 23.11.172.6730391
319383665913 = 3.133.19.383.6659
533671737975 = 34.52.17.53.367.797
2118067737975 = 32.52.7.79.211.80677
3111368374257 = 3.112.132.683.74257
3216177757191 = 3.73.191.757.21617
3740437158475 = 52.37.4043715847
3977292332775 = 3.52.292.233.277.977
4417149692375 = 53.7.23.4969.44171
7459655393232 = 24.32.72.23.45965539
7699132721175 = 3.52.72.27211.76991
7973529228735 = 3.5.7.972.2287.3529
10771673522535 = 34.5.67.71.107.52253

You can find them at the Online Encyclopedia of Integer Sequences under A121342, “Composite numbers that are a concatenation of their distinct prime divisors in some order.” But what about pairs of primal pellicles, that is, pairs of numbers where the prime factors of each form the pellicle of the other?

35 = 5.775 = 3.52
1275 = 3.52.173175 = 52.127
131715 = 32.5.2927329275 = 52.13171
3199767 = 3.359.297135932971 = 3.19.67.972
14931092 = 22.11.61.5563116155632 = 24.3.109.1492

And here are a few primal pellicles I’ve found in other bases:

Primal Pellicles in Base 2

1111011011110 = 10.1110.110110111 in b2 = 7902 = 2.32.439 in b10
1110001100110111 = 1110.10111.100011001 in b2 = 58167 = 32.23.281 in b10
1111011011011110 = 10.1110.110110110111 in b2 = 63198 = 2.32.3511 in b10
11101001100001101 = 1110.101.101001100001 in b2 = 119565 = 32.5.2657 in b10
1111011011011011110 = 10.1110.110110110110111 in b2 = 505566 = 2.32.28087 in b10
1111011111101111011 = 1110.1011.10111.11011111 in b2 = 507771 = 32.11.23.223 in b10


Primal Pellicles in Base 3

121022 = 210.12.102 in b3 = 440 = 23.5.11 in b10
212212 = 22.21.212 in b3 = 644 = 22.7.23 in b10
20110112 = 210.201.1011 in b3 = 4712 = 23.19.31 in b10
21110110 = 10.212.1101 in b3 = 5439 = 3.72.37 in b10
121111101 = 122.111.1101 in b3 = 12025 = 52.13.37 in b10
222112121 = 22.21.221121 in b3 = 19348 = 22.7.691 in b10
2202122021 = 22.2021.22021 in b3 = 54412 = 22.61.223 in b10
120212201221 = 2.122.21.201.1202 in b3 = 312550 = 2.52.7.19.47 in b10


Primal Pellicles in Base 7

2525 = 2.52.25 in b7 = 950 = 2.52.19 in b10
3210 = 2.34.10 in b7 = 1134 = 2.34.7 in b10
5252 = 2.52.52 in b7 = 1850 = 2.52.37 in b10
332616 = 33.16.326 in b7 = 58617 = 33.13.167 in b10
336045 = 32.5.3604 in b7 = 59715 = 32.5.1327 in b10
2251635 = 22.3.5.16.252 in b7 = 281580 = 22.3.5.13.192 in b10


Primal Pellicles in Base 11

253 = 22.3.52 in b11 = 300 = 22.3.52 in b10
732 = 2.32.72 in b11 = 882 = 2.32.72 in b10
2123 = 23.33.12 in b11 = 2808 = 23.33.13 in b10
3432 = 25.3.43 in b11 = 4512 = 25.3.47 in b10
3710 = 32.72.10 in b11 = 4851 = 32.72.11 in b10
72252 = 23.72.225 in b11 = 105448 = 23.72.269 in b10


Primal Pellicles in Base 15

275 = 24.5.7 in b15 = 560 = 24.5.7 in b10
2D5 = 2.52.D in b15 = 650 = 2.52.13 in b10
2CD5 = 2.52.CD in b15 = 9650 = 2.52.193 in b10
7BE3 = 3.72.BE in b15 = 26313 = 3.72.179 in b10
21285 = 24.52.128 in b15 = 105200 = 24.52.263 in b10

Punctuated Pairimeters

Imagine using the digits of n in two different bases to generate two fractions, a/b and c/d, where a/b < 1 and c/d < 1 (see Appendix for a sample program). Now use the fractions to find a pair of points on the perimeter of a circle, (x1, y1) and (x2, y2), then calculate and mark the midpoint of (x1, y1) and (x2, y2). If the bases have a prime factor in common, pretty patterns will appear from this punctuated pairimetry:

b1 = 2; b2 = 6


b1 = 2; b2 = 10


b1 = 2; b2 = 14


b1 = 4; b2 = 10


b1 = 4; b2 = 20


b1 = 4; b2 = 28


b1 = 6; b2 = 42


b1 = 12; b2 = 39


b1 = 24; b2 = 28


b1 = 28; b2 = 40


b1 = 32; b2 = 36


b1 = 42; b2 = 78


Appendix: Sample Program for Pairimetry

GetXY(xyi)=

fr = 0
recip = 1
bs = base[xyi]
for gi = 1 to di[xyi]
recip = recip/bs
fr += d[xyi,gi] * recip
next gi

x[xyi] = xcenter + sin(pi2 * fr) * radius
y[xyi] = ycenter + cos(pi2 * fr) * radius

endproc

Dinc(i1) =

d[i1,1]++;
if d[i1,1] == base[i1] then

i2 = 1

while d[i1,i2] == base[i1]

d[i1,i2] = 0
i2++;
d[i1,i2]++;

endwhile

if i2 > di[i1] then di[i1] = i2 endif

endif

endproc

Drawfigure =

base = x = y = di = array(2)
d = array(2,100)
radius = 100
pi2 = pi * 2
base[1] = 2
base[2] = 6
di[1] = 1
di[2] = 1

while true

for i = 1 to 2
call Dinc(i)
call GetXY(i)
next i

plot (x[1]+x[2]) / 2, (y[1] + y[2]) / 2

endwhile

endproc

call drawfigure

Summult-Time Hues

sum(3,6) = 3 * 6 = 18
3 * 2.3 = 2.3^2
sum(15,35) = 15 * 35 = 525
3.5 * 5.7 = 3.5^2.7
sum(85,204) = 85 * 204 = 17340
5.17 * 2^2.3.17 = 2^2.3.5.17^2
sum(493,1189) = 493 * 1189 = 586177
17.29 * 29.41 = 17.29^2.41
sum(2871,6930) = 2871 * 6930 = 19896030
3^2.11.29 * 2.3^2.5.7.11 = 2.3^4.5.7.11^2.29
sum(16731,40391) = 16731 * 40391 = 675781821
3^2.11.13^2 * 13^2.239 = 3^2.11.13^4.239
[…]


Elsewhere Other-Accessible

1, 18, 525, 17340, 586177, 19896030, 675781821, 22956120408, 779829016225, 26491211221770, 899921240562957, 30570830315362260, 1038508305678375841, 35278711540581704598, 1198437683944896688125, 40711602541832856049200, 1382996048733983114022337 — A011906 at the Online Encyclopedia of Integer Sequences

The Sumber of the B’s

First a bit of a boredom. Then a bit of beauty. These are the triangular numbers, including 666, the Number of the Beast:

1, 3, 6, 10, 15, 21, 28, 36, 45, 55, 66, 78, 91, 105, 120, 136, 153, 171, 190, 210, 231, 253, 276, 300, 325, 351, 378, 406, 435, 465, 496, 528, 561, 595, 630, 666, 703, 741, 780, 820, 861, 903, 946, 990, 1035, 1081, 1128, 1176, 1225, 1275, …

You can createthem as sumbers, that is, as numbers made by summing the whole numbers:

tri(1) = 1 = 1
tri(2) = 3 = 2+1
tri(3) = 6 = 3+2+1
tri(4) = 10 = 4+3+2+1
tri(5) = 15 = 5+4+3+2+1
tri(6) = 21 = 6+5+4+3+2+1
tri(7) = 28 = 7+6+5+4+3+2+1
tri(8) = 36 = 8+7+6+5+4+3+2+1
tri(9) = 45 = 9+8+7+6+5+4+3+2+1
tri(10) = 55 = 10+9+8+7+6+5+4+3+2+1

And here are the square numbers:

1, 4, 9, 16, 25, 36, 49, 64, 81, 100, 121, 144, 169, 196, 225, 256, 289, 324, 361, 400, 441, 484, 529, 576, 625, 676, 729, 784, 841, 900, 961, 1024, 1089, 1156, 1225, 1296, 1369, 1444, 1521, 1600, 1681, 1764, 1849, 1936, 2025, 2116, 2209, 2304, 2401, 2500, …

You can create square numbers in various ways. Most obviously, by multiplying each whole number by itself:

sq(1) = 1*1 = 1
sq(2) = 2*2 = 4
sq(3) = 3*3 = 9
sq(4) = 4*4 = 16
sq(5) = 5*5 = 25
sq(6) = 6*6 = 36
sq(7) = 7*7 = 49
sq(8) = 8*8 = 64
sq(9) = 9*9 = 81
sq(10) = 10*10 = 100

Less obviously, by summing consecutive odd numbers:

sq(1) = 1 = 1
sq(2) = 1+3 = 4
sq(3) = 1+3+5 = 9
sq(4) = 1+3+5+7 = 16
sq(5) = 1+3+5+7+9 = 25
sq(6) = 1+3+5+7+9+11 = 36
sq(7) = 1+3+5+7+9+11+13 = 49
sq(8) = 1+3+5+7+9+11+13+15 = 64
sq(9) = 1+3+5+7+9+11+13+15+17 = 81
sq(10) = 1+3+5+7+9+11+13+15+17+19 = 100

And by summing pairs of consecutive triangular numbers (note that tri(0) = 0):

sq(1) = tri(0) + tri(1) = 0 + 1 = 1
sq(2) = tri(1) + tri(2) = 1 + 3 = 4
sq(3) = tri(2) + tri(3) = 3 + 6 = 9
sq(4) = tri(3) + tri(4) = 6 + 10 = 16
sq(5) = tri(4) + tri(5) = 10 + 15 = 25
sq(6) = tri(5) + tri(6) = 15 + 21 = 36
sq(7) = tri(6) + tri(7) = 21 + 28 = 49
sq(8) = tri(7) + tri(8) = 28 + 36 = 64
sq(9) = tri(8) + tri(9) = 36 + 45 = 81
sq(10) = tri(9) + tri(10) = 45 + 55 = 100

But sometimes squares are the sum of two triangular numbers that aren’t consecutive:

sq(4) = tri(1) + tri(5) = 1+15 = 16
sq(9) = tri(2) + tri(12) = 3+78 = 81
sq(16) = tri(2) + tri(22) = 3+253 = 256
sq(52) = tri(2) + tri(73) = 3+2701 = 2704
sq(14) = tri(3) + tri(19) = 6+190 = 196
sq(21) = tri(3) + tri(29) = 6+435 = 441
sq(44) = tri(9) + tri(61) = 45+1891 = 1936
sq(51) = tri(9) + tri(71) = 45+2556 = 2601
sq(49) = tri(10) + tri(68) = 55+2346 = 2401
sq(56) = tri(10) + tri(78) = 55+3081 = 3136
sq(16) = tri(11) + tri(19) = 66+190 = 256
sq(38) = tri(11) + tri(52) = 66+1378 = 1444
sq(54) = tri(11) + tri(75) = 66+2850 = 2916
sq(87) = tri(47) + tri(113) = 1128+6441 = 7569
sq(77) = tri(48) + tri(97) = 1176+4753 = 5929
sq(121) = tri(64) + tri(158) = 2080+12561 = 14641
sq(141) = tri(96) + tri(174) = 4656+15225 = 19881
sq(121) = tri(100) + tri(138) = 5050+9591 = 14641

Here’s a graph of squares that are the sum of any two triangular numbers, that is, is_square(tri(k1)+tri(k2)). The x axis is 1..k1 and the y axis is 1..k2, so the graph is symmetrical:

tri(k1) + tri(k2) = square(k3)


The (double) line at 45° represents squares that are the sum of consecutive triangulars. Other lines represent similarly regular patterns. Now for a bit of beauty. Things get more visually interesting when you test for squares that are the sums of any integer and a triangular number:

k1 + tri(k2) = square(k3)


The curves are optical oddities: where do they begin and end? The upper ones become lost to the eye in the lower ones. And vice versa. But you can force your eye to trace them further that it wants to.

Now try sums of integers and other polygonal numbers:

k1 + tri(k2) = pentagonal(k3)


k1 + square(k2) = pentagonal(k3)


k1 + pentagonal(k2) = square(k3)


k1 + hexagonal(k2) = pentagonal(k3)


And try other number sequences, like multiples of 4 with polygonals:

k1*4 + pentagonal(k2) = tri(k3)


k1*4 + square(k2) = tri(k3)


k1*4 + heptagonal(k2) = tri(k3)


And primes with polygonals:

tri(k1) + prime(k2) = tri(k3)


prime(k1) + tri(k2) = square(k3)


prime(k1) + octagonal(k2) = square(k3)


prime(k1) + pentagonal(k2) = square(k3)


prime(k1) + square(k2) = decagonal(k3)


prime(k1) + tri(k2) = hendecagonal(k3)


Partitional Pulchritude

If you want a good example of how, in math, something very simple can quickly get very deep, just look at partitions. Here are the partitions of 1 to 5, that is, the ways 1 to 5 can be expressed as a sum of integers smaller than or equal to themselves:

1 = 1

numbpart(1) = 1


2 = 2
1 + 1 = 2

numbpart(2) = 2


3 = 3
1 + 2 = 3
1 + 1 + 1 = 3

numbpart(3) = 3


4 = 4
1 + 3 = 4
2 + 2 = 4
1 + 1 + 2 = 4
1 + 1 + 1 + 1 = 4

numbpart(4) = 5


5 = 5
1 + 4 = 5
2 + 3 = 5
1 + 1 + 3 = 5
1 + 2 + 2 = 5
1 + 1 + 1 + 2 = 5
1 + 1 + 1 + 1 + 1 = 5

numbpart(5) = 7


It’s very easy to understand the concept of partitions, but very difficult to understand how partitions behave. For example, here is numbpart(n), the count of partitions for 1, 2, 3,…

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, … A000041 at the Online Encyclopedia of Integer Sequences, “a(n) is the number of partitions of n (the partition numbers)”

What’s the formula for numbpart(n)? That’s a tricky question. And what’s the formula for the curves produced by counting the various lengths of partitions(n)? That’s another tricky question, but one thing is easy to see. As n gets bigger, the graph of countlen(partitions(n)) acquires a strange, lopsided beauty. Here are the partitions of 8, with the count of how many partitions of a particular length there are:

8 = 8 (1 partition of length 1)
1 + 7 = 8
2 + 6 = 8
3 + 5 = 8
4 + 4 = 8 (4 partitions of length 2)
1 + 1 + 6 = 8
1 + 2 + 5 = 8
1 + 3 + 4 = 8
2 + 2 + 4 = 8
2 + 3 + 3 = 8 (5 of length 3)
1 + 1 + 1 + 5 = 8
1 + 1 + 2 + 4 = 8
1 + 1 + 3 + 3 = 8
1 + 2 + 2 + 3 = 8
2 + 2 + 2 + 2 = 8 (5 of length 4)
1 + 1 + 1 + 1 + 4 = 8
1 + 1 + 1 + 2 + 3 = 8
1 + 1 + 2 + 2 + 2 = 8 (3 of length 5)
1 + 1 + 1 + 1 + 1 + 3 = 8
1 + 1 + 1 + 1 + 2 + 2 = 8 (2 of length 6)
1 + 1 + 1 + 1 + 1 + 1 + 2 = 8 (1 of length 7)
1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 = 8 (1 of length 8)

When counts like that are shown as a graph, the graphs look like this (maximum counts are normalized to the same height):


graph of countlen(partitions(2))



countlen(partitions(3))



countlen(partitions(4))



countlen(partitions(5))



countlen(partitions(6))



countlen(partitions(7))



countlen(partitions(8))



countlen(partitions(9))



countlen(partitions(10))



countlen(partitions(15))



countlen(partitions(20))



countlen(partitions(30))



countlen(partitions(40))



countlen(partitions(50))



countlen(partitions(60))



countlen(partitions(70))



countlen(partitions(80))



countlen(partitions(90))



countlen(partitions(100))



Animated gif of partlen graphs (courtesy EZgif)


The graphs have a long, low right tail because the counts rise to great heights very quick, then fall away again, as you can see with partitions(100):

1 = count(partitions(10),len=1)
50 = count(partitions(10),len=2)
833 = count(partitions(10),len=3)
7153 = count(partitions(10),len=4)
38225 = count(partitions(10),len=5)
143247 = count(partitions(10),len=6)

[…]

10643083 = count(partitions(10),len=16)
11022546 = count(partitions(10),len=17)
11087828 = count(partitions(10),len=18)
10885999 = count(partitions(10),len=19)
10474462 = count(partitions(10),len=20)

[…]

30 = count(partitions(10),len=91)
22 = count(partitions(10),len=92)
15 = count(partitions(10),len=93)
11 = count(partitions(10),len=94)
7 = count(partitions(10),len=95)
5 = count(partitions(10),len=96)
3 = count(partitions(10),len=97)
2 = count(partitions(10),len=98)
1 = count(partitions(10),len=99)
1 = count(partitions(10),len=100)

Matching Fractions

0.1666… = 1/6
0.0273972… = 2/73
0.0379746… = 3/79
0.0016181229… = 1/618
0.0027322404… = 2/732 → 1/366
0.0058548009… = 5/854
0.01393354769… = 13/933
0.07598784194… = 75/987 → 25/329
0.08998988877… = 89/989
0.141993957703… = 141/993 → 47/331
0.0005854115443… = 5/8541
0.00129282482223… = 12/9282 → 2/1547
0.00349722279366… = 34/9722 → 17/4861
0.013599274705349… = 135/9927 → 15/1103
0.0000273205382146… = 2/73205


0.0465103… = 4/65 in base 8 = 4/53 in base 10
0.13735223… = 13/73 in b8 = 11/59 in b10
0.0036256353… = 3/625 → 1/207 in b8 = 3/405 → 1/135 in b10
0.01172160236… = 11/721 → 3/233 in b8 = 9/465 → 3/155 in b10
0.01272533117… = 12/725 in b8 = 10/469 in b10
0.03175523464… = 31/755 in b8 = 25/493 in b10
0.06776766655… = 67/767 in b8 = 55/503 in b10
0.251775771755… = 251/775 in b8 = 169/509 in b10
0.0003625152504… = 3/6251 in b8 = 3/3241 in b10
0.00137303402723… = 13/7303 in b8 = 11/3779 in b10
0.00267525714052… = 26/7525 in b8 = 22/3925 in b10
0.035777577356673… = 357/7757 in b8 = 239/4079 in b10


0.3763… = 3/7 in b9 = 3/7 in b10
0.0155187… = 1/55 in b9 = 1/50 in b10
0.0371482… = 3/71 in b9 = 3/64 in b10
0.0474627… = 4/74 in b9 = 4/67 in b10
0.43878684… = 43/87 in b9 = 39/79 in b10
0.07887877766… = 78/878 in b9 = 71/719 in b10
0.01708848667… = 17/0884 → 4/221 in b9 = 16/724 → 4/181 in b10
0.170884866767… = 170/884 → 40/221 in b9 = 144/724 → 36/181 in b10


0.2828… = 2/8 → 1/4 in b11 = 2/8 → 1/4 in b10
0.4986… = 4/9 in b11 = 4/9 in b10
0.54A9A8A6… = 54/A9 in b11 = 59/119 in b10
0.0010A17039… = 1/A17 in b11 = 1/1228 in b10
0.010A170392A… = 10/A17 in b11 = 11/1228 in b10
0.01AA5854872… = 1A/A58 in b11 = 21/1273 in b10
0.027A716A416… = 27/A71 in b11 = 29/1288 in b10
0.032A78032A7… = 32/A78 → 1/34 in b11 = 35/1295 → 1/37 in b10
0.0190AA5A829… = 19/0AA5 → 4/221 in b11 = 20/1325 → 4/265 in b10
0.190AA5A829… = 190/AA5 → 40/221 in b11 = 220/1325 → 44/265 in b10


0.23B7A334… = 23/B7 in b12 = 27/139 in b10
0.075BA597224… = 75/BA5 in b12 = 89/1709 in b10
0.0ABBABAAA99… = AB/BAB in b12 = 131/1715 in b10
0.185BB5B859B4… = 185/BB5 in b12 = 245/1721 in b10

Phascinating Phibonacci Phact Phor Phiday

Phiday falls on the 11th, 12th and 23rd of each month, because 11, 12 and 23 represent entries in the famous Fibonacci sequence:

1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181, 6765, 10946, 17711, 28657, 46368, 75025, 121393, 196418, 317811, 514229, 832040, 1346269, 2178309, 3524578, 5702887, 9227465, 14930352, 24157817, 39088169, 63245986, 102334155, 165580141, 267914296, 433494437, 701408733, 1134903170, 1836311903, 2971215073, 4807526976, 7778742049, 12586269025, 20365011074, 32951280099, 53316291173, 86267571272, 139583862445, 225851433717, 365435296162, 591286729879, 956722026041, 1548008755920, 2504730781961, 4052739537881, 6557470319842, 10610209857723, 17167680177565, 27777890035288, 44945570212853, 72723460248141, 117669030460994, 190392490709135, 308061521170129, 498454011879264, 806515533049393, 1304969544928657, …

Successive entries in the Fibonacci sequence provide better and better approximations to the golden ratio or φ = 1.61803398874989484820458683…

2 = 2/1
1.5 = 3/2
1.6 = 5/3
1.6 = 8/5
1.625 = 13/8
1.6153846… = 21/13
1.619047619… = 34/21
1.6176470588235294117647… = 55/34
1.618… = 89/55
1.617977528… = 144/89
1.61805… = 233/144
1.618025751… = 377/233
1.618037135… = 610/377
1.618032786… = 987/610
1.618034447… = 1597/987
1.618033813… = 2584/1597
1.618034055… = 4181/2584
1.618033963… = 6765/4181
1.618033998… = 10946/6765
1.618033985… = 17711/10946

Today is 23rd June, so here’s a Fascinating Fibonacci Fact for Phiday. First, list the rational fractions < 1 in simplified form and mark the Fibonacci fractions:

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

Next, record the positions in the fraction list of the FibFracs, i.e. pos(fibonacci(i)/fibonacci(i+1)) = pos(fibfrac(i)):

1, 3, 8, 20, 53, 135, 353, 924, 2422, 6311, 16529, 43229, 113066, 296173, 775286, 2029661, 5313844, 13911391, 36419909, 95348490, 249624578, 653521015, 1710943906, 4479312193, 11726939926, 30701521655, 80377560978, 210431191133, 550915866198, 1442316294349, 3776032465954, 9885782372588, 25881314454327, 67758160822605, 177393168080718, 464421339906882, 1215870841639593, …

What do you get when you divide pos(fibfrac(i+1)) by pos(fibfrac(i))?

pos(1/2) = 1
pos(2/3) = 3 (3/1 = 3)
pos(3/5) = 8 (8/3 = 2.6…)
pos(5/8) = 20 (20/8 = 2.5)
pos(8/13) = 53 (53/20 = 2.65)
pos(13/21) = 135 (2.5471698113207…)
pos(21/34) = 353 (2.6148…)
pos(34/55) = 924 (2.617563739376770538243626062…)
pos(55/89) = 2422 (2.621…)
pos(89/144) = 6311 (2.605697770437654830718414533…)
pos(144/233) = 16529 (2.619077800665504674378070037…)
pos(233/377) = 43229 (2.615342730957710690301893642…)
pos(377/610) = 113066 (2.615512734506928219482291980…)
pos(610/987) = 296173 (2.619470044045071020465922559…)
pos(987/1597) = 775286 (2.617679531895209894217231145…)
pos(1597/2584) = 2029661 (2.617951310871084993150914630…)
pos(2584/4181) = 5313844 (2.618094351716863062353762525…)
pos(4181/6765) = 13911391 (2.617952465296309037299551888…)
pos(6765/10946) = 36419909 (2.617991903182075753603647543…)
pos(10946/17711) = 95348490 (2.618032076906068051954770123…)
pos(17711/28657) = 249624578 (2.618023400265699016313735016…)
pos(28657/46368) = 653521015 (2.618015502463863954934758067…)
pos(46368/75025) = 1710943906 (2.618039614227248683043497844…)
pos(75025/121393) = 4479312193 (2.618035680358535377956453004…)
pos(121393/196418) = 11726939926 (2.618022459860278821159630657…)
pos(196418/317811) = 30701521655 (2.618033506501651708043379296…)
pos(317811/514229) = 80377560978 (2.618031831816708695313688353…)
pos(514229/832040) = 210431191133 (2.618034045479393794998913484…)
pos(832040/1346269) = 550915866198 (2.618033302153394031845776103…)
pos(1346269/2178309) = 1442316294349 (2.618033683260502304564996035…)
pos(2178309/3524578) = 3776032465954 (2.618033562227999267671331082…)
pos(3524578/5702887) = 9885782372588 (2.618034262608066669117450079…)
pos(5702887/9227465) = 25881314454327 (2.618034008728793003503058474…)
pos(9227465/14930352) = 67758160822605 (2.618033985181798482654668954…)
pos(14930352/24157817) = 177393168080718 (2.618033989221521810752093192…)
pos(24157817/39088169) = 464421339906882 (2.618033969017113072183685603…)
pos(39088169/63245986) = 1215870841639593 (2.618033964338027806153843993…)
[…]

In other words, pos(fibfrac(i+1)) / pos(fibfrac(i)) → φ^2 = 2.61803398874989484820458683… = φ + 1


Previously Pre-Posted (Please Peruse)

Friday is Φiday