Wow, that sounds like a fantastic definition. I've been racking my brains for something similar, and this is the best I could come up with:First I'll define it in terms of a game, so you can see what's going on. Later I'll do it more formally. Let x lie in the interval <0, 1> and let d_n(x) be the nth digit after the decimal point in the base 3 expansion of x. (note: I say a_n(1) is 2 for all n, and if x is a terminating fraction, I let you decide whether to represent it as such or with a tail of infinitely many 2s. So you could represent 0.1212 as 0.1212000000... or 0.121122222222.... I shall show that the value of the function is independant of the representation that you choose.)
Take three boxes, labelled 0, 1, and 2, and put 3 marbles, labelled u, v and w respectively, into those boxes. By v(i) I mean the value of the variable whose name is written on the marble in box i. Initially, u = v = w = 0. To put it another way, for all i v(i) = 0.
For each n in turn, starting with n = 1:
If d_n(x) = 0 then add 1/2^n to v(0) and swap the marbles in boxes 1 and 2.
If d_n(x) = 1 then add 1/2^n to v(1), but do not do any swapping
If d_n(x) = 2 then add 1/2^n to v(2) and swap the marbles in boxes 0 and 1.
When you have done this for all n, you will obtain values for u, v and w such that u + v + w = 1. Define f(x) to be the point with areal (barycentric) co-ordinates (u, v, w).
Handily, your definition of the sierpinski gasket in terms of areal co-ordinates makes it clear from the rules of the game that f(x) is always an element of the sierpinski gasket.
Now, for that demonstration I was promising you; that the representation of x that you choose is irrelevant. Let x be 0.(stuff)10000000... (the case 0.(stuff)200000000... is very similar). After playing the game up to the end of stuff, you step back and look at what you will add to the variables in the future. Well, you will add 1/2^n for some n to v(1), and then add all the remaining powers of two to v(0), merrily swapping the marbles in boxes 1 and 2 forever. But the sum of all the remaining powers of two is also 1/2^n. So you will add 1/2^n to both v(0) and v(1). The other way you could have represented x is as 0.(stuff)02222222... Stepping back and performing the calculation as before, you find that once more you will add 1/2^n to v(0) and v(1).
The above demonstration is enough to show that the function is continuous. Also, for any point of the sierpinski gasket, it is clear that there is a game which will lead to that point. So f has all the required properties.
It'seems odd to define a function in a way that means it takes infinite time to find it's value. Well, firstly, for any rational x the game player's behaviour will ultimately be periodic and an observer could calculate what the eventual values of u, v, and w would be within finite time. For irrational x, it is harder to justify. To escape this criticism, there are two alternatives:
1. Define f for only rational x initially. Any irrational x is a limit of a sequence of rationals and by continuity we may define f(x) as the limit point of the image of that sequence under f.
2. Observe that the same troubles are encountered with many functions where things dependant on the digits in some expansion of x are summed (without a rearrangement style game), but are just ignored, and so ignore this problem too (in the name of consistency).
Now for that more formal, equivalent definition. First, I'll get my notation straight. P{(u, v, w)} is the point with areal co-ordinates (u, v, w). ((a, b, c), (d, e, f), (g, h, i)) denotes the 3 by 3 matrix with first row a b c, second row d e f etc. Let Sum(r = a, b, c(r)) be the sum from r = a to b of c(r). Let the function Product be similarly defined. Since I am using matrix multiplication, I shall specify the order: c(b) furthest left then in order down to c(a) furthest right. For example, Product(t = 7, 10, A(t) + B(t)) is (A(10) + B(10))*(A(9) + B(9))*(A(8) + B(8))*(A(7) + B(7)). Define functions g and H as follows:
g(0) = (1, 0, 0)
g(1) = (0, 1, 0)
g(2) = (0, 0, 1)
H(0) = ((1/2, 0, 0), (0, 0, 1/2), (0, 1/2, 0))
H(1) = ((1/2, 0, 0), (0, 1/2, 0), (0, 0, 1/2))
H(2) = ((0, 1/2, 0), (1/2, 0, 0), (0, 0, 1/2))
Then:
P{..... + g(d_2(x)))*H(d_2(x)) + g(d_1(x)))*H(d_1(x))} = f(x)
to put it another way:
f(x) = P{Sum(r = 1, infinity, g(d_r(x)) * Product(s = 1, r, H(d_s(x))))}
Thankyou
sfwc
<><
PS The function f defined in this post, and that in my original post, are identical, despite the very different definitions.