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

Mathematicoynte

Pre-previously, I looked at a fractal phallus. Now I want to look at a fractal fanny (in the older British sense). In fact, it’s a fractional fractal fanny. Take a look at these fractions:


1/10, 1/9, 1/8, 1/7, 1/6, 1/5, 2/10, 2/9, 1/4, 2/8, 2/7, 3/10, 1/3, 2/6, 3/9, 3/8, 2/5, 4/10, 3/7, 4/9, 1/2, 2/4, 3/6, 4/8, 5/10, 5/9, 4/7, 3/5, 6/10, 5/8, 2/3, 4/6, 6/9, 7/10, 5/7, 3/4, 6/8, 7/9, 4/5, 8/10, 5/6, 6/7, 7/8, 8/9, 9/10

They’re all the fractions for 1/2..(n-1)/n, n = 10, sorted by increasing size. But obviously some of them are the same: 1/2 = 2/4 = 3/6 = 5/10, 1/3 = 2/6 = 3/9, 1/4 = 2/8, and so on. If you remove the duplicates, you get this set of reduced fractions:


1/10, 1/9, 1/8, 1/7, 1/6, 1/5, 2/9, 1/4, 2/7, 3/10, 1/3, 3/8, 2/5, 3/7, 4/9, 1/2, 5/9, 4/7, 3/5, 5/8, 2/3, 7/10, 5/7, 3/4, 7/9, 4/5, 5/6, 6/7, 7/8, 8/9, 9/10

Now here are the reduced fractions for 1/2..(n-1)/n, n = 30:


1/30, 1/29, 1/28, 1/27, 1/26, 1/25, 1/24, 1/23, 1/22, 1/21, 1/20, 1/19, 1/18, 1/17, 1/16, 1/15, 2/29, 1/14, 2/27, 1/13, 2/25, 1/12, 2/23, 1/11, 2/21, 1/10, 3/29, 2/19, 3/28, 1/9, 3/26, 2/17, 3/25, 1/8, 3/23, 2/15, 3/22, 4/29, 1/7, 4/27, 3/20, 2/13, 3/19, 4/25, 1/6, 5/29, 4/23, 3/17, 5/28, 2/11, 5/27, 3/16, 4/21, 5/26, 1/5, 6/29, 5/24, 4/19, 3/14, 5/23, 2/9, 5/22, 3/13, 7/30, 4/17, 5/21, 6/25, 7/29, 1/4, 7/27, 6/23, 5/19, 4/15, 7/26, 3/11, 8/29, 5/18, 7/25, 2/7, 7/24, 5/17, 8/27, 3/10, 7/23, 4/13, 9/29, 5/16, 6/19, 7/22, 8/25, 9/28, 1/3, 10/29, 9/26, 8/23, 7/20, 6/17, 5/14, 9/25, 4/11, 11/30, 7/19, 10/27, 3/8, 11/29, 8/21, 5/13, 7/18, 9/23, 11/28, 2/5, 11/27, 9/22, 7/17, 12/29, 5/12, 8/19, 11/26, 3/7, 13/30, 10/23, 7/16, 11/25, 4/9, 13/29, 9/20, 5/11, 11/24, 6/13, 13/28, 7/15, 8/17, 9/19, 10/21, 11/23, 12/25, 13/27, 14/29, 1/2, 15/29, 14/27, 13/25, 12/23, 11/21, 10/19, 9/17, 8/15, 15/28, 7/13, 13/24, 6/11, 11/20, 16/29, 5/9, 14/25, 9/16, 13/23, 17/30, 4/7, 15/26, 11/19, 7/12, 17/29, 10/17, 13/22, 16/27, 3/5, 17/28, 14/23, 11/18, 8/13, 13/21, 18/29, 5/8, 17/27, 12/19, 19/30, 7/11, 16/25, 9/14, 11/17, 13/20, 15/23, 17/26, 19/29, 2/3, 19/28, 17/25, 15/22, 13/19, 11/16, 20/29, 9/13, 16/23, 7/10, 19/27, 12/17, 17/24, 5/7, 18/25, 13/18, 21/29, 8/11, 19/26, 11/15, 14/19, 17/23, 20/27, 3/4, 22/29, 19/25, 16/21, 13/17, 23/30, 10/13, 17/22, 7/9, 18/23, 11/14, 15/19, 19/24, 23/29, 4/5, 21/26, 17/21, 13/16, 22/27, 9/11, 23/28, 14/17, 19/23, 24/29, 5/6, 21/25, 16/19, 11/13, 17/20, 23/27, 6/7, 25/29, 19/22, 13/15, 20/23, 7/8, 22/25, 15/17, 23/26, 8/9, 25/28, 17/19, 26/29, 9/10, 19/21, 10/11, 21/23, 11/12, 23/25, 12/13, 25/27, 13/14, 27/29, 14/15, 15/16, 16/17, 17/18, 18/19, 19/20, 20/21, 21/22, 22/23, 23/24, 24/25, 25/26, 26/27, 27/28, 28/29, 29/30

Can you see the fractal fanny? Not unless you’re superhuman. But any normal human can see the fractal fanny when you turn those reduced and sorted fractions, a/b, into a graph, where y = b and x = n for a/bn:

graph for b of reduced a/b = 1/2..29/30, sorted by size of a/b

(click for larger)


If you don’t reduce the fractions, you get this distorted coynte:

graph for b of all fractions 1/2..29/30, sorted by a/b


And you can use other variables for y, like the sum of the continued fraction of a/b:

graph for sum(contfrac(a/b)) of reduced fractions 1/2..29/30, sorted by a/b


graph for cfsum of all fractions 1/2..29/30, sorted by a/b


And the product of the continued fraction of a/b:

graph for prod(contfrac(a/b)) of reduced fractions 1/2..29/30, sorted by a/b


graph for cfmul of all fractions 1/2..29/30, sorted by a/b


And you can sort by the size of other variables, like the number of factors of b:

graph for a+b of all fractions 1/2..29/30, sorted by factornum(b)


And so on:

graph for a of reduced fractions 1/2..29/30, sorted by a/b


graph for a of reduced fractions 1/2..29/30, sorted by a/b


graph for a of all fractions 1/2..29/30, sorted by a/b


graph for a of all fractions 1/2..29/30, sorted by length(contfrac(a/b))


graph for a of all fractions 1/2..29/30, sorted by factornum(b)


graph for a of all fractions 1/2..29/30, sorted by gcd(a/b)


graph for a+b of all fractions 1/2..29/30, sorted by a/b


graph for a+b of reduced fractions 1/2..29/30, sorted by a/b


graph for a+b of all fractions 1/2..29/30, sorted by a+b


graph for a+b of all fractions 1/2..29/30, sorted by cflen(a/b)


graph for a+b of all fractions 1/2..29/30, sorted by gbd(a,b)


graph for b of all fractions 1/2..29/30, sorted by a+b


graph for b of all fractions 1/2..29/30, sorted by cflen(a/b)


graph for b of all fractions 1/2..29/30, sorted by factnum(b)


graph for b of all fractions 1/2..29/30, sorted by gcd(a,b)


graph for b-a of all fractions 1/2..29/30, sorted by a/b


graph for b-a of reduced fractions 1/2..29/30, sorted by a/b


graph for b-a of all fractions 1/2..29/30, sorted by a+b


graph for b-a of all fractions 1/2..29/30, sorted by factnum(b)


graph for cfmul of all fractions 1/2..29/30, sorted by a


graph for cfsum of all fractions 1/2..29/30, sorted by a


Previously Pre-Posted (Please Peruse)

Phrallic Frolics — a look at fractal phalluses, a.k.a. phralluses

The Call of CFulhu

“The most merciful thing in the world, I think, is the inability of the human mind to correlate all its contents.” So said HPL in “The Call of Cthulhu” (1926). But I’d still like to correlate the contents of mine a bit better. For example, I knew that φ, the golden ratio, is the most irrational of all numbers, in that it is the slowest to be approximated with rational fractions. And I also knew that continued fractions, or CFs, were a way of representing both rationals and irrationals as a string of numbers, like this:

contfrac(10/7) = [1; 2, 3]
10/7 = 1 + 1/(2 + 1/3)
10/7 = 1.428571428571…

contfrac(3/5) = [0; 1, 1, 2]
4/5 = 0 + 1/(1 + 1/(1 + 1/2))
4/5 = 0.8

contfrac(11/8) = [1; 2, 1, 2]
11/8 = 1 + 1/(2 + 1/(1 + 1/2))
11/8 = 1.375

contfrac(4/7) = [0; 1, 1, 3]
4/7 = 0 + 1/(1 + 1/(1 + 1/3))
4/7 = 0.57142857142…

contfrac(17/19) = [0; 1, 8, 2]
17/19 = 0 + 1/(1 + 1/(8 + 1/2))
17/19 = 0.8947368421052…

contfrac(8/25) = [0; 3, 8]
8/25 = 0 + 1/(3 + 1/8)
8/25 = 0.32

contfrac(√2) = [1; 2, 2, 2, 2, 2, 2, 2…] = [1; 2]

√2 = 1 + 1/(2 + 1/(2 + 1/(2 + 1/(2 + 1/(2 + 1/(2 + 1/2 + …))))))

√2 = 1.41421356237309504…

contfrac(φ) = [1; 1, 1, 1, 1, 1, 1, 1, 1…]

φ = 1/(1 + 1/(1 + 1/(1 + 1/(1 + 1/(1 + 1/(1 + 1/(1 + 1/1 + …)))))))

φ = 1.6180339887498948…


But I didn’t correlate those two contents of my mind: the maximal irrationality of φ and the way continued fractions work.

That’s why I was surprised when I was looking at the continued fractions of 2..(n-1) / n for 3,4,5,6,7… That is, I was looking at the continued fractions of 2/3, 3/4, 2/5, 3/5, 4/5, 5/6, 2/7, 3/7… (skipping fractions like 2/4, 2/6, 3/6 etc, because they’re reducible: 2/4 = ½, 2/6 = 1/3, 3/6 = ½ etc). I wondered which fractions set successive records for the length of their continued fractions as one worked through ½, 2/3, 3/4, 2/5, 3/5, 4/5, 5/6, 2/7, 3/7… And because I hadn’t correlated the contents of my mind, I was surprised at the result. I shouldn’t have been, of course:

contfrac(1/2) = [0; 2] (cfl=1)
1/2 = 0 + 1/2
1/2 = 0.5

contfrac(2/3) = [0; 1, 2] (cfl=2)
2/3 = 0 + 1/(1 + 1/2)
2/3 = 0.666666666…

contfrac(3/5) = [0; 1, 1, 2] (cfl=3)
3/5 = 0 + 1/(1 + 1/(1 + 1/2))
3/5 = 0.6

contfrac(5/8) = [0; 1, 1, 1, 2] (cfl=4)
5/8 = 0 + 1/(1 + 1/(1 + 1/(1 + 1/2)))
5/8 = 0.625

contfrac(8/13) = [0; 1, 1, 1, 1, 2] (cfl=5)
8/13 = 0 + 1/(1 + 1/(1 + 1/(1 + 1/(1 + 1/2))))
8/13 = 0.615384615…

contfrac(13/21) = [0; 1, 1, 1, 1, 1, 2] (cfl=6)
13/21 = 0 + 1/(1 + 1/(1 + 1/(1 + 1/(1 + 1/(1 + 1/2)))))
13/21 = 0.619047619…

contfrac(21/34) = [0; 1, 1, 1, 1, 1, 1, 2] (cfl=7)
21/34 = 0 + 1/(1 + 1/(1 + 1/(1 + 1/(1 + 1/(1 + 1/(1 + 1/2))))))
21/34 = 0.617647059…

contfrac(34/55) = [0; 1, 1, 1, 1, 1, 1, 1, 2] (cfl=8)
contfrac(55/89) = [0; 1, 1, 1, 1, 1, 1, 1, 1, 2] (cfl=9)
contfrac(89/144) = [0; 1, 1, 1, 1, 1, 1, 1, 1, 1, 2] (cfl=10)
contfrac(144/233) = [0; 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2] (cfl=11)
contfrac(233/377) = [0; 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2] (cfl=12)
contfrac(377/610) = [0; 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2] (cfl=13)
contfrac(610/987) = [0; 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2] (cfl=14)
contfrac(987/1597) = [0; 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2] (cfl=15)
contfrac(1597/2584) = [0; 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2] (cfl=16)
contfrac(2584/4181) = [0; 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2] (cfl=17)
contfrac(4181/6765) = [0; 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2] (cfl=18)
[…]


Which n1/n2 set records for the length of their continued fractions (with n2 > n1)? It’s the successive Fibonacci fractions, fib(i)/fib(i+1), of course. I didn’t anticipate that answer because I didn’t understand φ and continued fractions properly. And I still don’t, because I’ve been surprised again today looking at palindromic CFs like these:

contfrac(2/5) = [0; 2, 2] (cfl=2)
2/5 = 0 + 1/(2 + 1/2)
2/5 = 0.4

contfrac(3/8) = [0; 2, 1, 2] (cfl=3)
3/8 = 0 + 1/(2 + 1/(1 + 1/2))
3/8 = 0.375

contfrac(3/10) = [0; 3, 3] (cfl=2)
3/10 = 0 + 1/(3 + 1/3)
3/10 = 0.3

contfrac(5/12) = [0; 2, 2, 2] (cfl=3)
5/12 = 0 + 1/(2 + 1/(2 + 1/2))
5/12 = 0.416666666…

contfrac(5/13) = [0; 2, 1, 1, 2] (cfl=4)
5/13 = 0 + 1/(2 + 1/(1 + 1/(1 + 1/2)))
5/13 = 0.384615384…

contfrac(4/15) = [0; 3, 1, 3] (cfl=3)
4/15 = 0 + 1/(3 + 1/(1 + 1/3))
4/15 = 0.266666666…

contfrac(7/16) = [0; 2, 3, 2] (cfl=3)
7/16 = 0 + 1/(2 + 1/(3 + 1/2))
7/16 = 0.4375

contfrac(4/17) = [0; 4, 4] (cfl=2)
4/17 = 0 + 1/(4 + 1/4)
4/17 = 0.235294117…


Again, I wondered which of these fractions set successive records for the length of their palindromic continued fractions. Here’s the answer:

contfrac(1/2) = [0; 2] (cfl=1)
1/2 = 0 + 1/2
1/2 = 0.5

contfrac(2/5) = [0; 2, 2] (cfl=2)
2/5 = 0 + 1/(2 + 1/2)
2/5 = 0.4

contfrac(3/8) = [0; 2, 1, 2] (cfl=3)
3/8 = 0 + 1/(2 + 1/(1 + 1/2))
3/8 = 0.375

contfrac(5/13) = [0; 2, 1, 1, 2] (cfl=4)
5/13 = 0 + 1/(2 + 1/(1 + 1/(1 + 1/2)))
5/13 = 0.384615384…

contfrac(8/21) = [0; 2, 1, 1, 1, 2] (cfl=5)
8/21 = 0 + 1/(2 + 1/(1 + 1/(1 + 1/(1 + 1/2))))
8/21 = 0.380952380…

contfrac(13/34) = [0; 2, 1, 1, 1, 1, 2] (cfl=6)
13/34 = 0 + 1/(2 + 1/(1 + 1/(1 + 1/(
1
+ 1/(1 + 1/2)))))
13/34 = 0.382352941..

contfrac(21/55) = [0; 2, 1, 1, 1, 1, 1, 2] (cfl=7)
21/55 = 0 + 1/(2 + 1/(1 + 1/(1 + 1/(1 + 1/(1 + 1/(1 + 1/2))))))
21/55 = 0.381818181…

contfrac(34/89) = [0; 2, 1, 1, 1, 1, 1, 1, 2] (cfl=8)
contfrac(55/144) = [0; 2, 1, 1, 1, 1, 1, 1, 1, 2] (cfl=9)
contfrac(89/233) = [0; 2, 1, 1, 1, 1, 1, 1, 1, 1, 2] (cfl=10)
contfrac(144/377) = [0; 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2] (cfl=11)
contfrac(233/610) = [0; 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2] (cfl=12)
contfrac(377/987) = [0; 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2] (cfl=13)
contfrac(610/1597) = [0; 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2] (cfl=14)
contfrac(987/2584) = [0; 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2] (cfl=15)
contfrac(1597/4181) = [0; 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2] (cfl=16)
contfrac(2584/6765) = [0; 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2] (cfl=17)
[…]


Now it’s the successive Fibonacci skip-one fractions, fib(i)/fib(i+2), that set records for the length of their palindromic continued fractions. But I think you’d have to be very good at maths not to be surprised by that result.

After that, I continued to be compelled by the Call of CFulhu and started to look at the CFs of Fibonacci skip-n fractions in general. That’s contfrac(fib(i)/fib(i+n)) for n = 1,2,3,… And I’ve found more interesting patterns, as I’ll describe in a follow-up post.

Fract-L Geometry

Suppose you set up an L, i.e. a vertical and horizontal line, representing the x,y coordinates between 0 and 1. Next, find the fractional pairs x = 1/2, 1/3, 2/3, 1/4, 2/4…, y = 1/2, 1/3, 2/3, 1/4, 2/4… and mark the point (x,y). That is, find the point, say, 1/5 of the way along the x-line, then the points 1/5, 2/5, 3/5 and 4/5 along the y-line, marking the points (1/5, 1/5), (1/5, 2/5), (1/5, 3/5), (1/5, 4/5). Then find (2/5, 1/5), (2/5, 2/5), (2/5, 3/5), (2/5, 4/5) and so on. Some interesting patterns appear in what I call a Frac-L (pronounced “frackle”) or Fract-L:

Frac-L for 1/2 to 21/22


Frac-L for 1/2 to 48/49


Frac-L for 1/2 to 75/76


Frac-L for 1/2 to 102/103


Frac-L for 1/2 to 102/103 (animated)


If the (x,y) point is first red, then becomes different colors as it is repeatedly found, you get these patterns:

Frac-L for 1/2 to 48/49 (color)


Frac-L for 1/2 to 75/79 (color)


Frac-L for 1/2 to 102/103 (color) (animated)


Now try polygonal numbers. The triangular numbers are 1, 3, 6, 10, 15, 21, 28, 36, 45, 55, 66, 78…, so you’re finding the fractional pairs, say, (1/21, 1/21), (1/21, 3/21, (1/21, 6/21), (1/21, 10/21), (1/21, 15/21), then (3/21, 1/21), (3/21, 3/21, (3/21, 6/21), (3/21, 10/21), (3/21, 15/21), and so on:

Frac-L for triangular fractions


The frac-L for square numbers (1, 4, 9, 16, 25, 36, 49, 64, 81, 100…) is almost identical:

Frac-L for square fractions, e.g. (1/16, 1/16), (1/16, 4/16), (1/16, 9/16)…


So is the frac-L for pentagonal numbers (1, 5, 12, 22, 35, 51, 70, 92, 117, 145, 176, 210, 247, 287, 330…):

Frac-L for pentagonal fractions, e.g. (1/35, 5/35), (1/35, 12/35), (1/35,22/35)…


Here are frac-Ls for tetrahedral and square-pyramidal numbers:

Frac-L for tetrahedral fractions


Frac-L for square pyramidal fractions


But what about prime numbers (skipping 2)? Here the fractional pairs are, say, (1/17, 1/17), (1/17, 3/17), (1/17, 5/17), (1/17, 7/17), (1/17, 11/17), (1/17, 13/17), then (3/17, 1/17), (3/17, 3/17), (3/17, 5/17), (3/17, 7/17), (3/17, 11/17), (3/17, 13/17), and so on:

Frac-L for 1/3 to 73/79 (prime fractions)


Frac-L for 1/3 to 223/227


Frac-L for 1/3 to 307/331


Frac-L for 1/3 to 307/331 (animated)


Frac-L for 1/3 to 73/79 (color) (prime fractions)


Frac-L for 1/3 to 223/227 (color)


Frac-L for 1/3 to 307/331 (color)


Frac-L for 1/3 to 307/331 (color) (animated)


And finally (for now), a frac-L for Fibonnaci numbers, where the fractional pairs are, say, (1/13, /13), (1/13, 2/13), (1/13, 3/13), (1/13, 5/13), (1/13, 8/13), then (2/13, /13), (2/13, 2/13), (2/13, 3/13), (2/13, 5/13), (2/13, 8/13), and so on:

Frac-L for Fibonacci fractions to 14930352/2178309 = fibonacci(36)/fibonacci(37)


There are 719 errors in this sentence

Here’s a famous paradox (or a variant of it at least):

• There are two errers in this sentence.

The only visible error is the misspelt “errers”. But if the sentence claims to have two errors while having only one, that is another error and there are two errors after all.

Now for another variant. I’m not sure if I’ve thought this up for myself, but try this sentence:

• There are three errors in this sentence.

There are no visible errors in the sentence. Therefore it has one error: the claim that it has three errors when there is in fact no error. But if it has one error, it’s in error to claim that it has three errors. Therefore the sentence has two errors. And if it has two errors, again it’s in error, because it claims to have three errors while having only two. Therefore it has three errors after all.

The same reasoning can be applied to any integral number of errors:

• There are five errors in this sentence.
• There are 719 errors in this sentence.
• There are 1,000,000 errors in this sentence.
• There are 1,000,000,000 errors in this sentence.

No matter how large the number of errors, the sentence becomes true instantly, because each time the sentence makes a false claim, it makes another error. But those “times of error” don’t take place in time, any more than this equation does:

• 2 = 1 + 1/2 + 1/4 + 1/8 + 1/16…

So I think these sentences are instantly true:

• There are infinitely many errors in this sentence.
• There are ∞ errors in this sentence.

But there are infinitely many infinities. Ordinary infinity, the infinity of 1,2,3…, is called ℵ0 or aleph-zero. It’s a countable infinity. Above that comes ℵ1, an uncountable infinity. So does this sentence instantly become true?

• There are ℵ1 errors in this sentence.

I’m not sure. But I think I can argue for the validity of sentences claiming fractional or irrational number of errors:

• There is 1.5 errors in this sentence.
• There are π errors in this sentence.

Let’s have a look at “There is 1.5 errors in this sentence”. There are no visible errors, so there’s one error: the claim that sentence contains 1.5 errors. So now there seems to be another error: the sentence has one error but claims to have 1.5 errors. But does it therefore have two errors? No, because if it has two errors, it’s still in error and has three errors. And that generates another error and another and another, and so on for ever. The sentence becomes unstoppably and infinitely false.

So let’s go back to the point at which the sentence contains one error. Now, the difference between 1 error and 1.5 errors is small — less than a full error. So how big is the error of claiming to have 1.5 errors when having 1 error? Well, it’s obviously 0.5 of an error. So the sentence contains 1.5 errors after all.

Now for “There are π errors in this sentence”. There are no visible errors, so there’s one error: the claim that the sentence contains π errors. Therefore it contains one error. But it claims to have π errors, so it has another error. And if it has 2 errors and claims to have π errors, it has another and third error. But if it has three errors and claims to have π error, it’s still in error. But only slightly — it’s now committing a small amount of an error. How much? It can only be 0.14159265… of an error. Therefore it’s committing 3.14159265… = π errors and is a true sentence.

Now try:

• There is -1 error in this sentence.

What is a negative error? A truth. So I think that sentence is valid too. But I can’t think of how to use i, or the square root of -1, in a sentence like that.

The Power of Powder

• Racine carrée de 2, c’est 1,414 et des poussières… Et quelles poussières ! Des grains de sable qui empêchent d’écrire racine de 2 comme une fraction. Autrement dit, cette racine n’est pas dans Q. — Rationnel mon Q: 65 exercices de styles, Ludmilla Duchêne et Agnès Leblanc (2010)

• The square root of 2 is 1·414 and dust… And what dust! Grains of sand that stop you writing the root of 2 as a fraction. Put another way, this root isn’t in Q [the set of rational numbers].

Gyp Cip

Abundance often overwhelms, but restriction reaps riches. That’s true in mathematics and science, where you can often understand the whole better by looking at only a part of it first — restriction reaps riches. Egyptian fractions are one example in maths. In ancient Egypt, you could have any kind of fraction you liked so long as it was a reciprocal like 1/2, 1/3, 1/4 or 1/5 (well, there were two exceptions: 2/3 and 3/4 were also allowed).

So when mathematicians speak of “Egyptian fractions”, they mean those fractions that can be represented as a sum of reciprocals. Egyptian fractions are restricted and that reaps riches. Here’s one example: how many ways can you add n distinct reciprocals to make 1? When n = 1, there’s one way to do it: 1/1. When n = 2, there’s no way to do it, because 1 – 1/2 = 1/2. Therefore the summed reciprocals aren’t distinct: 1/2 + 1/2 = 1. After that, 1 – 1/3 = 2/3, 1 – 1/4 = 3/4, and so on. By the modern meaning of “Egyptian fraction”, there’s no solution for n = 2.

However, when n = 3, there is a way to do it:

• 1/2 + 1/3 + 1/6 = 1

But that’s the only way. When n = 4, things get better:

• 1/2 + 1/4 + 1/6 + 1/12 = 1
• 1/2 + 1/3 + 1/10 + 1/15 = 1
• 1/2 + 1/3 + 1/9 + 1/18 = 1
• 1/2 + 1/4 + 1/5 + 1/20 = 1
• 1/2 + 1/3 + 1/8 + 1/24 = 1
• 1/2 + 1/3 + 1/7 + 1/42 = 1

What about n = 5, n = 6 and so on? You can find the answer at the Online Encyclopedia of Integer Sequences (OEIS), where sequence A006585 is described as “Egyptian fractions: number of solutions to 1 = 1/x1 + … + 1/xn in positive integers x1 < … < xn”. The sequence is one of the shortest and strangest at the OEIS:

• 1, 0, 1, 6, 72, 2320, 245765, 151182379

When n = 1, there’s one solution: 1/1. When n = 2, there’s no solution, as I showed above. When n = 3, there’s one solution again. When n = 4, there are six solutions. And the OEIS tells you how many solutions there are for n = 5, 6, 7, 8. But n >= 9 remains unknown at the time of writing.

To understand the problem, consider the three reciprocals, 1/2, 1/3 and 1/5. How do you sum them? They have different denominators, 2, 3 and 5, so you have to create a new denominator, 30 = 2 * 3 * 5. Then you have to adjust the numerators (the numbers above the fraction bar) so that the new fractions have the same value as the old:

• 1/2 = 15/30 = (2*3*5 / 2) / 30
• 1/3 = 10/30 = (2*3*5 / 3) / 30
• 1/5 = 06/30 = (2*3*5 / 5) / 30
• 15/30 + 10/30 + 06/30 = (15+10+6) / 30 = 31/30 = 1 + 1/30

Those three reciprocals don’t sum to 1. Now try 1/2, 1/3 and 1/6:

• 1/2 = 18/36 = (2*3*6 / 2) / 36
• 1/3 = 12/36 = (2*3*6 / 3) / 36
• 1/6 = 06/36 = (2*3*6 / 6) / 36
• 18/36 + 12/36 + 06/36 = (18+12+6) / 36 = 36/36 = 1

So when n = 3, the problem consists of finding three reciprocals, 1/a, 1/b and 1/c, such that for a, b, and c:

• a*b*c = a*b + a*c + b*c

There is only one solution: a = 2, b = 3 and c = 6. When n = 4, the problem consists of finding four reciprocals, 1/a, 1/b, 1/c and 1/d, such that for a, b, c and d:

• a*b*c*d = a*b*c + a*b*d + a*c*d + b*c*d

For example:

• 2*4*6*12 = 576
• 2*4*6 + 2*4*12 + 2*6*12 + 4*6*12 = 48 + 96 + 144 + 288 = 576
• 2*4*6*12 = 2*4*6 + 2*4*12 + 2*6*12 + 4*6*12 = 576

Therefore:

• 1/2 + 1/4 + 1/6 + 1/12 = 1

When n = 5, the problem consists of finding five reciprocals, 1/a, 1/b, 1/c, 1/d and 1/e, such that for a, b, c, d and e:

• a*b*c*d*e = a*b*c*d + a*b*c*e + a*b*d*e + a*c*d*e + b*c*d*e

There are 72 solutions and here they are:

• 1/2 + 1/4 + 1/10 + 1/12 + 1/15 = 1 (#1)
• 1/2 + 1/4 + 1/9 + 1/12 + 1/18 = 1 (#2)
• 1/2 + 1/5 + 1/6 + 1/12 + 1/20 = 1 (#3)
• 1/3 + 1/4 + 1/5 + 1/6 + 1/20 = 1 (#4)
• 1/2 + 1/4 + 1/8 + 1/12 + 1/24 = 1 (#5)
• 1/2 + 1/3 + 1/12 + 1/21 + 1/28 = 1 (#6)
• 1/2 + 1/4 + 1/6 + 1/21 + 1/28 = 1 (#7)
• 1/2 + 1/4 + 1/7 + 1/14 + 1/28 = 1 (#8)
• 1/2 + 1/3 + 1/12 + 1/20 + 1/30 = 1 (#9)
• 1/2 + 1/4 + 1/6 + 1/20 + 1/30 = 1 (#10)
• 1/2 + 1/5 + 1/6 + 1/10 + 1/30 = 1 (#11)
• 1/2 + 1/3 + 1/11 + 1/22 + 1/33 = 1 (#12)
• 1/2 + 1/3 + 1/14 + 1/15 + 1/35 = 1 (#13)
• 1/2 + 1/3 + 1/12 + 1/18 + 1/36 = 1 (#14)
• 1/2 + 1/4 + 1/6 + 1/18 + 1/36 = 1 (#15)
• 1/2 + 1/3 + 1/10 + 1/24 + 1/40 = 1 (#16)
• 1/2 + 1/4 + 1/8 + 1/10 + 1/40 = 1 (#17)
• 1/2 + 1/4 + 1/7 + 1/12 + 1/42 = 1 (#18)
• 1/2 + 1/3 + 1/9 + 1/30 + 1/45 = 1 (#19)
• 1/2 + 1/4 + 1/5 + 1/36 + 1/45 = 1 (#20)
• 1/2 + 1/5 + 1/6 + 1/9 + 1/45 = 1 (#21)
• 1/2 + 1/3 + 1/12 + 1/16 + 1/48 = 1 (#22)
• 1/2 + 1/4 + 1/6 + 1/16 + 1/48 = 1 (#23)
• 1/2 + 1/3 + 1/9 + 1/27 + 1/54 = 1 (#24)
• 1/2 + 1/3 + 1/8 + 1/42 + 1/56 = 1 (#25)
• 1/2 + 1/3 + 1/8 + 1/40 + 1/60 = 1 (#26)
• 1/2 + 1/3 + 1/10 + 1/20 + 1/60 = 1 (#27)
• 1/2 + 1/3 + 1/12 + 1/15 + 1/60 = 1 (#28)
• 1/2 + 1/4 + 1/5 + 1/30 + 1/60 = 1 (#29)
• 1/2 + 1/4 + 1/6 + 1/15 + 1/60 = 1 (#30)
• 1/2 + 1/4 + 1/5 + 1/28 + 1/70 = 1 (#31)
• 1/2 + 1/3 + 1/8 + 1/36 + 1/72 = 1 (#32)
• 1/2 + 1/3 + 1/9 + 1/24 + 1/72 = 1 (#33)
• 1/2 + 1/4 + 1/8 + 1/9 + 1/72 = 1 (#34)
• 1/2 + 1/3 + 1/12 + 1/14 + 1/84 = 1 (#35)
• 1/2 + 1/4 + 1/6 + 1/14 + 1/84 = 1 (#36)
• 1/2 + 1/3 + 1/8 + 1/33 + 1/88 = 1 (#37)
• 1/2 + 1/3 + 1/10 + 1/18 + 1/90 = 1 (#38)
• 1/2 + 1/3 + 1/7 + 1/78 + 1/91 = 1 (#39)
• 1/2 + 1/3 + 1/8 + 1/32 + 1/96 = 1 (#40)
• 1/2 + 1/3 + 1/9 + 1/22 + 1/99 = 1 (#41)
• 1/2 + 1/4 + 1/5 + 1/25 + 1/100 = 1 (#42)
• 1/2 + 1/3 + 1/7 + 1/70 + 1/105 = 1 (#43)
• 1/2 + 1/3 + 1/11 + 1/15 + 1/110 = 1 (#44)
• 1/2 + 1/3 + 1/8 + 1/30 + 1/120 = 1 (#45)
• 1/2 + 1/4 + 1/5 + 1/24 + 1/120 = 1 (#46)
• 1/2 + 1/5 + 1/6 + 1/8 + 1/120 = 1 (#47)
• 1/2 + 1/3 + 1/7 + 1/63 + 1/126 = 1 (#48)
• 1/2 + 1/3 + 1/9 + 1/21 + 1/126 = 1 (#49)
• 1/2 + 1/3 + 1/7 + 1/60 + 1/140 = 1 (#50)
• 1/2 + 1/4 + 1/7 + 1/10 + 1/140 = 1 (#51)
• 1/2 + 1/3 + 1/12 + 1/13 + 1/156 = 1 (#52)
• 1/2 + 1/4 + 1/6 + 1/13 + 1/156 = 1 (#53)
• 1/2 + 1/3 + 1/7 + 1/56 + 1/168 = 1 (#54)
• 1/2 + 1/3 + 1/8 + 1/28 + 1/168 = 1 (#55)
• 1/2 + 1/3 + 1/9 + 1/20 + 1/180 = 1 (#56)
• 1/2 + 1/3 + 1/7 + 1/54 + 1/189 = 1 (#57)
• 1/2 + 1/3 + 1/8 + 1/27 + 1/216 = 1 (#58)
• 1/2 + 1/4 + 1/5 + 1/22 + 1/220 = 1 (#59)
• 1/2 + 1/3 + 1/11 + 1/14 + 1/231 = 1 (#60)
• 1/2 + 1/3 + 1/7 + 1/51 + 1/238 = 1 (#61)
• 1/2 + 1/3 + 1/10 + 1/16 + 1/240 = 1 (#62)
• 1/2 + 1/3 + 1/7 + 1/49 + 1/294 = 1 (#63)
• 1/2 + 1/3 + 1/8 + 1/26 + 1/312 = 1 (#64)
• 1/2 + 1/3 + 1/7 + 1/48 + 1/336 = 1 (#65)
• 1/2 + 1/3 + 1/9 + 1/19 + 1/342 = 1 (#66)
• 1/2 + 1/4 + 1/5 + 1/21 + 1/420 = 1 (#67)
• 1/2 + 1/3 + 1/7 + 1/46 + 1/483 = 1 (#68)
• 1/2 + 1/3 + 1/8 + 1/25 + 1/600 = 1 (#69)
• 1/2 + 1/3 + 1/7 + 1/45 + 1/630 = 1 (#70)
• 1/2 + 1/3 + 1/7 + 1/44 + 1/924 = 1 (#71)
• 1/2 + 1/3 + 1/7 + 1/43 + 1/1806 = 1 (#72)

All the sums start with 1/2 except for one:

• 1/2 + 1/5 + 1/6 + 1/12 + 1/20 = 1 (#3)
• 1/3 + 1/4 + 1/5 + 1/6 + 1/20 = 1 (#4)

Here are the solutions in another format:

(2,4,10,12,15), (2,4,9,12,18), (2,5,6,12,20), (3,4,5,6,20), (2,4,8,12,24), (2,3,12,21,28), (2,4,6,21,28), (2,4,7,14,28), (2,3,12,20,30), (2,4,6,20,30), (2,5,6,10,30), (2,3,11,22,33), (2,3,14,15,35), (2,3,12,18,36), (2,4,6,18,36), (2,3,10,24,40), (2,4,8,10,40), (2,4,7,12,42), (2,3,9,30,45), (2,4,5,36,45), (2,5,6,9,45), (2,3,12,16,48), (2,4,6,16,48), (2,3,9,27,54), (2,3,8,42,56), (2,3,8,40,60), (2,3,10,20,60), (2,3,12,15,60), (2,4,5,30,60), (2,4,6,15,60), (2,4,5,28,70), (2,3,8,36,72), (2,3,9,24,72), (2,4,8,9,72), (2,3,12,14,84), (2,4,6,14,84), (2,3,8,33,88), (2,3,10,18,90), (2,3,7,78,91), (2,3,8,32,96), (2,3,9,22,99), (2,4,5,25,100), (2,3,7,70,105), (2,3,11,15,110), (2,3,8,30,120), (2,4,5,24,120), (2,5,6,8,120), (2,3,7,63,126), (2,3,9,21,126), (2,3,7,60,140), (2,4,7,10,140), (2,3,12,13,156), (2,4,6,13,156), (2,3,7,56,168), (2,3,8,28,168), (2,3,9,20,180), (2,3,7,54,189), (2,3,8,27,216), (2,4,5,22,220), (2,3,11,14,231), (2,3,7,51,238), (2,3,10,16,240), (2,3,7,49,294), (2,3,8,26,312), (2,3,7,48,336), (2,3,9,19,342), (2,4,5,21,420), (2,3,7,46,483), (2,3,8,25,600), (2,3,7,45,630), (2,3,7,44,924), (2,3,7,43,1806)


Note

Strictly speaking, there are two solutions for n = 2 in genuine Egyptian fractions, because 1/3 + 2/3 = 1 and 1/4 + 3/4 = 1. As noted above, 2/3 and 3/4 were permitted as fractions in ancient Egypt.

Fract-Hills

The Farey sequence is a fascinating sequence of fractions that divides the interval between 0/1 and 1/1 into smaller and smaller parts. To find the Farey fraction a[i] / b[i], you simply find the mediant of the Farey fractions on either side:

• a[i] / b[i] = (a[i-1] + a[i+1]) / (b[i-1] + b[i+1])

Then, if necessary, you reduce the numerator and denominator to their simplest possible terms. So the sequence starts like this:

• 0/1, 1/1

To create the next stage, find the mediant of the two fractions above: (0+1) / (1+1) = 1/2

• 0/1, 1/2, 1/1

For the next stage, there are two mediants to find: (0+1) / (1+2) = 1/3, (1+1) / (2+3) = 2/3

• 0/1, 1/3, 1/2, 2/3, 1/1

Note that 1/2 is the mediant of 1/3 and 2/3, that is, 1/2 = (1+2) / (3+3) = 3/6 = 1/2. The next stage is this:

• 0/1, 1/4, 1/3, 2/5, 1/2, 3/5, 2/3, 3/4, 1/1

Now 1/2 is the mediant of 2/5 and 3/5, that is, 1/2 = (2+3) / (5+5) = 5/10 = 1/2. Further stages go like this:

• 0/1, 1/5, 1/4, 2/7, 1/3, 3/8, 2/5, 3/7, 1/2, 4/7, 3/5, 5/8, 2/3, 5/7, 3/4, 4/5, 1/1

• 0/1, 1/6, 1/5, 2/9, 1/4, 3/11, 2/7, 3/10, 1/3, 4/11, 3/8, 5/13, 2/5, 5/12, 3/7, 4/9, 1/2, 5/9, 4/7, 7/12, 3/5, 8/13, 5/8, 7/11, 2/3, 7/10, 5/7, 8/11, 3/4, 7/9, 4/5, 5/6, 1/1

• 0/1, 1/7, 1/6, 2/11, 1/5, 3/14, 2/9, 3/13, 1/4, 4/15, 3/11, 5/18, 2/7, 5/17, 3/10, 4/13, 1/3, 5/14, 4/11, 7/19, 3/8, 8/21, 5/13, 7/18, 2/5, 7/17, 5/12, 8/19, 3/7, 7/16, 4/9, 5/11, 1/2, 6/11, 5/9, 9/16, 4/7, 11/19, 7/12, 10/17, 3/5, 11/18, 8/13, 13/21, 5/8, 12/19, 7/11, 9/14, 2/3, 9/13, 7/10, 12/17, 5/7, 13/18, 8/11, 11/15, 3/4, 10/13, 7/9, 11/14, 4/5, 9/11, 5/6, 6/7, 1/1

The Farey sequence is actually a fractal, as you can see more easily when it’s represented as an image:

Farey fractal stage #1, representing 0/1, 1/2, 1/1

Farey fractal stage #2, representing 0/1, 1/3, 1/2, 2/3, 1/1

Farey fractal stage #3, representing 0/1, 1/4, 1/3, 2/5, 1/2, 3/5, 2/3, 3/4, 1/1

Farey fractal stage #4, representing 0/1, 1/5, 1/4, 2/7, 1/3, 3/8, 2/5, 3/7, 1/2, 4/7, 3/5, 5/8, 2/3, 5/7, 3/4, 4/5, 1/1

Farey fractal stage #5

Farey fractal stage #6

Farey fractal stage #7

Farey fractal stage #8

Farey fractal stage #9

Farey fractal stage #10

Farey fractal (animated)

That looks like the slope of a hill to me, so you could call it a Farey fract-hill. But Farey fract-hills or Farey fractals aren’t confined to the unit interval, 0/1 to 1/1. Here are Farey fractals for the intervals 0/1 to n/1, n = 1..10:

Farey fractal for interval 0/1 to 1/1

Farey fractal for interval 0/1 to 2/1, beginning 0/1, 1/4, 1/3, 2/5, 1/2, 3/5, 2/3, 3/4, 1/1, 5/4, 4/3, 7/5, 3/2, 8/5, 5/3, 7/4, 2/1

Farey fractal for interval 0/1 to 3/1, beginning 0/1, 1/3, 1/2, 2/3, 1/1, 5/4, 4/3, 7/5, 3/2, 8/5, 5/3, 7/4, 2/1, 7/3, 5/2, 8/3, 3/1

Farey fractal for interval 0/1 to 4/1, beginning
0/1, 1/3, 1/2, 2/3, 1/1, 4/3, 3/2, 5/3, 2/1, 7/3, 5/2, 8/3, 3/1, 10/3, 7/2, 11/3, 4/1

Farey fractal for interval 0/1 to 5/1, beginning 0/1, 1/1, 5/4, 10/7, 5/3, 7/4, 2/1, 7/3, 5/2, 8/3, 3/1, 13/4, 10/3, 25/7, 15/4, 4/1, 5/1

Farey fractal for interval 0/1 to 6/1, beginning 0/1, 1/2, 1/1, 4/3, 3/2, 5/3, 2/1, 5/2, 3/1, 7/2, 4/1, 13/3, 9/2, 14/3, 5/1, 11/2, 6/1

Farey fractal for interval 0/1 to 7/1, beginning 0/1, 7/5, 7/4, 2/1, 7/3, 21/8, 14/5, 3/1, 7/2, 4/1, 21/5, 35/8, 14/3, 5/1, 21/4, 28/5, 7/1

Farey fractal for interval 0/1 to 8/1, beginning 0/1, 1/2, 1/1, 3/2, 2/1, 5/2, 3/1, 7/2, 4/1, 9/2, 5/1, 11/2, 6/1, 13/2, 7/1, 15/2, 8/1

Farey fractal for interval 0/1 to 9/1, beginning 0/1, 1/1, 3/2, 2/1, 3/1, 7/2, 4/1, 13/3, 9/2, 14/3, 5/1, 11/2, 6/1, 7/1, 15/2, 8/1, 9/1

Farey fractal for interval 0/1 to 10/1, beginning 0/1, 5/4, 5/3, 2/1, 5/2, 3/1, 10/3, 15/4, 5/1, 25/4, 20/3, 7/1, 15/2, 8/1, 25/3, 35/4, 10/1

The shape of the slope is determined by the factorization of n:

n = 12 = 2^2 * 3

n = 16 = 2^4

n = 18 = 2 * 3^2

n = 20 = 2^2 * 5

n = 25 = 5^2

n = 27 = 3^3

n = 32 = 2^5

n = 33 = 3 * 11

n = 42 = 2 * 3 * 7

n = 64 = 2^6

n = 65 = 5 * 13

n = 70 = 2 * 5 * 7

n = 77 = 7 * 11

n = 81 = 3^4

n = 96 = 2^5 * 3

n = 99 = 3^2 * 11

n = 100 = 2^2 * 5^2

Farey fractal-hills, n = various

For Revver and Fevver

This shape reminds me of the feathers on an exotic bird:

feathers

(click or open in new window for full size)


feathers_anim

(animated version)


The shape is created by reversing the digits of a number, so you could say it involves revvers and fevvers. I discovered it when I was looking at the Halton sequence. It’s a sequence of fractions created according to a simple but interesting rule. The rule works like this: take n in base b, reverse it, and divide reverse(n) by the first power of b that is greater than n.

For example, suppose n = 6 and b = 2. In base 2, 6 = 110 and reverse(110) = 011 = 11 = 3. The first power of 2 that is greater than 6 is 2^3 or 8. Therefore, halton(6) in base 2 equals 3/8. Here is the same procedure applied to n = 1..20:

1: halton(1) = 1/10[2] → 1/2
2: halton(10) = 01/100[2] → 1/4
3: halton(11) = 11/100[2] → 3/4
4: halton(100) = 001/1000[2] → 1/8
5: halton(101) = 101/1000[2] → 5/8
6: halton(110) = 011/1000 → 3/8
7: halton(111) = 111/1000 → 7/8
8: halton(1000) = 0001/10000 → 1/16
9: halton(1001) = 1001/10000 → 9/16
10: halton(1010) = 0101/10000 → 5/16
11: halton(1011) = 1101/10000 → 13/16
12: halton(1100) = 0011/10000 → 3/16
13: halton(1101) = 1011/10000 → 11/16
14: halton(1110) = 0111/10000 → 7/16
15: halton(1111) = 1111/10000 → 15/16
16: halton(10000) = 00001/100000 → 1/32
17: halton(10001) = 10001/100000 → 17/32
18: halton(10010) = 01001/100000 → 9/32
19: halton(10011) = 11001/100000 → 25/32
20: halton(10100) = 00101/100000 → 5/32…

Note that the sequence always produces reduced fractions, i.e. fractions in their lowest possible terms. Once 1/2 has appeared, there is no 2/4, 4/8, 8/16…; once 3/4 has appeared, there is no 6/8, 12/16, 24/32…; and so on. If the fractions are represented as points in the interval [0,1], they look like this:

line1_1_2

point = 1/2


line2_1_4

point = 1/4


line3_3_4

point = 3/4


line4_1_8

point = 1/8


line5_5_8

point = 5/8


line6_3_8

point = 3/8


line7_7_8

point = 7/8


line_b2_anim

(animated line for base = 2, n = 1..63)


It’s apparent that Halton points in base 2 will evenly fill the interval [0,1]. Now compare a Halton sequence in base 3:

1: halton(1) = 1/10[3] → 1/3
2: halton(2) = 2/10[3] → 2/3
3: halton(10) = 01/100[3] → 1/9
4: halton(11) = 11/100[3] → 4/9
5: halton(12) = 21/100[3] → 7/9
6: halton(20) = 02/100 → 2/9
7: halton(21) = 12/100 → 5/9
8: halton(22) = 22/100 → 8/9
9: halton(100) = 001/1000 → 1/27
10: halton(101) = 101/1000 → 10/27
11: halton(102) = 201/1000 → 19/27
12: halton(110) = 011/1000 → 4/27
13: halton(111) = 111/1000 → 13/27
14: halton(112) = 211/1000 → 22/27
15: halton(120) = 021/1000 → 7/27
16: halton(121) = 121/1000 → 16/27
17: halton(122) = 221/1000 → 25/27
18: halton(200) = 002/1000 → 2/27
19: halton(201) = 102/1000 → 11/27
20: halton(202) = 202/1000 → 20/27
21: halton(210) = 012/1000 → 5/27
22: halton(211) = 112/1000 → 14/27
23: halton(212) = 212/1000 → 23/27
24: halton(220) = 022/1000 → 8/27
25: halton(221) = 122/1000 → 17/27
26: halton(222) = 222/1000 → 26/27
27: halton(1000) = 0001/10000 → 1/81
28: halton(1001) = 1001/10000 → 28/81
29: halton(1002) = 2001/10000 → 55/81
30: halton(1010) = 0101/10000 → 10/81

And here is an animated gif representing the Halton sequence in base 3 as points in the interval [0,1]:

line_b3_anim


Halton points in base 3 also evenly fill the interval [0,1]. What happens if you apply the Halton sequence to a two-dimensional square rather a one-dimensional line? Suppose the bottom left-hand corner of the square has the co-ordinates (0,0) and the top right-hand corner has the co-ordinates (1,1). Find points (x,y) inside the square, with x supplied by the Halton sequence in base 2 and y supplied by the Halton sequence in base 3. The square will gradually fill like this:

square1

x = 1/2, y = 1/3


square2

x = 1/4, y = 2/3


square3

x = 3/4, y = 1/9


square4

x = 1/8, y = 4/9


square5

x = 5/8, y = 7/9


square6

x = 3/8, y = 2/9


square7

x = 7/8, y = 5/9


square8

x = 1/16, y = 8/9


square9

x = 9/16, y = 1/27…


square_anim

animated square


Read full page: For Revver and Fevver