[math-fun] squarefree string draws Sierpinski triangle
As in my 5 Dec 96 mail (Thanks Rich!), let d(n) be the alternating sum of the nonzero digits of the balanced ternary representation of n. E.g., d(-69) -> -1,0,1,1 -> -1-1+1 = -1. Then d is an odd function, and mod 3 is a squarefree (stutter-free) sequence. For n>=0, 0 1 2 1 0 1 2 0 2 1 0 2 0 1 2 1 0 1 2 0 1 0 2 1 2 0 2 1 0 2 0 1 0 2 1 2 0 1 2 1 0 1 2 0 2 1 0 2 0 1 2 1 0 1 2 0 1 0 2 0 1 2 1 0 2 1 2 0 2 1 0 1 2 0 1 0 2 . . .. Claim: the series of increments (-)^k exp(2 i pi d(k)/3) from k = -(3^n+1)/2 to (3^n-1)/2 draws a self-avoiding polygonal approximation to a curve which sweeps out the triangular Sierpinski "sponge" (or "gasket"). (Try it!) (Spongebob Trianglepants?) For k>=0, it draws a diagonal chain of consecutively larger ones (= the right half of an infinitely large one). There's a lot of interesting math here. I believe n (3 - 1) t ---------- 2 2 i pi d(k) ==== ----------- \ k 3 > (- 1) e / ==== n 3 + 1 k = - ------ 2 f(t) := limit ----------------------------------- n -> oo n 2 is a continuous map of [0,1] onto the closure of the Sierpinski triangle with the unit interval of the real axis as base. This gives us explicit valuations of f where t has a simple ternary expansion, e.g., the rationals. (f(.012101202..._3) = ?) Other claims: n 3 - 1 ------ 2 2 i pi d(k) ==== ----------- \ k 3 > k (- 1) e / ==== n 3 + 1 k = - ------ i sqrt(3) 2 - --------- = limit -------------------------------------, 6 n -> oo n n 2 3 n 3 - 1 ------ 2 2 i pi d(k) ==== ----------- \ 2 k 3 > k (- 1) e / ==== n 3 + 1 k = - ------ 1 2 - = limit --------------------------------------, 8 n -> oo 2 n n 3 2 n 3 - 1 ------ 2 2 i pi d(k) ==== ----------- \ 3 k 3 > k (- 1) e / ==== n 3 + 1 k = - ------ 7 i sqrt 3 2 - ---------- = limit --------------------------------------, ... 432 n -> oo 3 n n 3 2 --rwg PS, Weisstein gives (Thue-Morse sequence) the base 3 squarefree string 0 2 1 0 1 2 0 2 1 2 0 1 0 2 1 0 1 2 0 1 0 2 1 2 0 2 1 0 1 2 0 2 1 2 0 1 0 ... based on renaming the base 4 digits of twice the parity constant. Simpler: Parity(n+1) - Parity(n), where Parity(n) is the usual sum mod 2 of the binary digits of n. (Add 2 mod 3 for the exact match.)
rwg>There's a lot of interesting math here. I believe n (3 - 1) t ---------- 2 2 i pi d(k) ==== ----------- \ k 3 > (- 1) e / ==== n 3 + 1 k = - ------ 2
f(t) := limit ----------------------------------- n -> oo n 2
is a continuous map of [0,1] onto the closure of the Sierpinski triangle with the unit interval of the real axis as base. This gives us explicit valuations of f where t has a simple ternary expansion, e.g., the rationals.
Based on self-similarity of the graph, exp(4 pi i/3) (f(1-3t) - 1)/2, 0 <= t <= 1/3; f(t) := { (exp(i pi/3) + f(3t-1))/2, 1/3 <= t <= 2/3; 1 + f(3-3t) exp(2 i pi/3)/2, 2/3 <= t <= 1; plus continuity defines f on [0,1]. E.g., (c282) makelist(funmake(f,[k/5])=f(k/5),k,1,4) 2 1 %i sqrt(3) + 1 f(-) - 1 f(-) + -------------- 1 5 2 5 2 (d282) [f(-) = --------------, f(-) = ---------------------, 5 %i sqrt(3) - 1 5 2 4 %i sqrt(3) + 1 %i sqrt(3) 1 3 f(-) + -------------- (---------- - -) f(-) + 2 3 5 2 4 2 2 5 f(-) = ---------------------, f(-) = -------------------------] 5 2 5 2 (c283) linsolve(%,map(lhs,%)) 1 %i sqrt(3) + 5 2 2 %i sqrt(3) + 3 (d283) [f(-) = --------------, f(-) = ----------------, 5 14 5 7 3 2 %i sqrt(3) + 4 4 %i sqrt(3) + 9 f(-) = ----------------, f(-) = --------------] 5 7 5 14 1 1 4 %i sqrt(3) + 2 5 %i sqrt(3) + 5 6 2 (d284) [f(-) = -, f(-) = --------------, f(-) = --------------, f(-) = -, 7 3 7 3 7 6 7 3 3 %i sqrt(3) + 1 2 %i sqrt(3) + 1 f(-) = --------------, f(-) = --------------] 7 3 7 6 Note f(1/7) and f(6/7) lie on the bottom edge despite period six ternary expansions. Only a set of t of measure 0 map onto an edge of a triangular cell. 1 4 %i sqrt(3) + 5 25 %i sqrt(3) + 56 (d285) [f(--) = ----------------, f(--) = ---------------, 28 73 28 73 9 16 %i sqrt(3) + 20 f(--) = ------------------] 28 73 1 541 %i sqrt(3) + 717 (d286) f(--) = -------------------- 29 10922 f(1/sqrt 2) and f(1/sqrt 3) do not appear to be algebraic of degree <= 12. --rwg
participants (1)
-
R. William Gosper