And if you exhaustively search for a nice formula over all 2^n pairings of preimages, you always come up empty! Julian has figured out that the "nice formula" involves a nice little function that FindSequenceFunction never considers! For tridrag := the terDragon, and f a triadic rational fraction, and n a positive integer, his (amazing) formula is "median"("median") (really mean(mean)) == tridrag[f - 3^-n]/4 + tridrag[f]/2 + tridrag[f + 3^-n]/4 == tridrag[f + 7/80 3^(1 - n) lnd[f]] == tridrag[f - 17/80 3^(1 - n) lnd[f]], where lnd[f] := (-1)^(the least significant nonzero ternary digit of the triadic rational f), thereby explaining *both* preimages! (Experimentally, this seems to require n>1.) lnd[f_Rational] := (-1)^RealDigits[f, 3][[1, -1]] I strongly suspect that there's a nicer such formula for t(-)/3 + t/3 + t(+)/3, vs this t(-)/4 + t/2 + t(+)/4 case. E.g., for triadic rational f, it seems always to give triple points: In[415]:= tridrag[5/9 - 1/9]/3 + tridrag[5/9]/3 + tridrag[5/9 + 1/9]/3 // Expand Out[415]= 1/2 - I/(6 Sqrt[3]) In[416]:= dragtry@% Out[416]= {13/27, 16/27, 19/27} —rwg PS, Julian has the even hairier formula for "median"("median"("median"))! If f is a non-triadic rational, there is no lowest order nonzero base 3 digit, and the med(med) probably won't be a double point: In[409]:= tridrag[1/2 - 1/9]/4 + tridrag[1/2]/2 + tridrag[1/2 + 1/9]/4 // Expand Out[409]= 1/2 In[410]:= dragtry@% Out[410]= {1/2} On Thu, Jul 23, 2020 at 9:42 PM Bill Gosper <billgosper@gmail.com> wrote:
A couple of months ago, Julian found the first half of this identity for the (self avoiding) "median curve" <http://gosper.org/dragmed.png> of the usual dyadic rational sweep over 2^k+1 points.
1/2 (dragun[2^-k n] + dragun[2^-k (1 + n)]) == dragun[2^-k (1/2 - 1/4 (-1)^(1 + n) + n)] == dragun[2^(-3 - k) (-4 + 8 (1 + n) + Sqrt[2] Cos[1/4 (1 + n) π] - 2 Cos[1/2 (1 + n) π] - Sqrt[2] Cos[3/4 (1 + n)π] - (2 + Sqrt[2]) Sin[1/4 (1 + n) π] + 2 Sin[1/2 (1 + n) π] - (-2 + Sqrt[2]) Sin[3/4 (1 + n) π])]
I just "conjectured" this 2nd half. The Heighway function never sees the trigs and radicals, which are artifacts of a period 8 perturbation of the sweep parameter.
Mandelbrot seemed slightly embarrassed by his kludgy averaging|smoothing recipe for self avoidance. I'll bet he would have been pleased to see it fall out of these simple formulas. Though not nearly as pleased as just being able to exactly evaluate continuous fractal curves anywhere on the continuum.
It turns out that the (self-avoidng) median curve of the Terdragon <http://gosper.org/Terdmed.png> is identical to merely phase shifting it by half a step. It's possible that this is a new theorem, since it's not obvious how to take half a step on a triadic fractal. But it's hard to find a nice sampling pattern for the median <http://gosper.org/Terdshftmed.png> curve of the median curve <http://gosper.org/Terdshftmed.png>, because all its points are double! Leaving you with an exponential search (over the two-valued inverses) for a simple pattern. —rwg