Ternary expansions are unique except at points k/3m, which have exactly two: the terminating one 0.c1​…cm−1​1 and the repeating-2 one 0.c1​…cm−1​0222…3​.
If some ck​=1 with k<m, both expansions see the first 1 at the same position, so the b-sequences agree.
Otherwise the terminating expansion has N=m with bm​=1, while the repeating-2 expansion has no 1 at all, giving bm​=0 and bk​=1 for k>m — but ∑k>m​2−k=2−m, so the totals agree.
Example: 0.0222…3​ has N=∞, hence b=0.0111…2​=1/2; 0.13​ has N=1, hence b1​=1 and f=1/2.
So f is well-defined.
The function f is nondecreasing.
Let x<y and look at the (chosen) ternary expansions.
Let k be the first index where either expansion has digit 1 or the two expansions differ (such an index exists since xî€ =y).
The first k−1 digits are shared and contain no 1, so they lie in {0,2}; write S=∑i<k​(ci​/2)2−i for their shared contribution.
The pair (ck​(x),ck​(y)) at index k is one of (1,1), (0,1), (0,2), (1,2).
Case (1,1): both see their first 1 at k, so f(x)=f(y)=S+2−k (e.g. x=0.1000…3​, y=0.1200…3​ gives k=1 and f(x)=f(y)=1/2).
Case (0,1): x has bk​=0 and tail at most ∑i>k​2−i=2−k, so f(x)≤S+2−k; y sees its first 1 at k, so f(y)=S+2−k.
Case (0,2): f(x)≤S+2−k while y has bk​=1 and tail ≥0, so f(y)≥S+2−k.
Case (1,2): f(x)=S+2−k and f(y)≥S+2−k.
In every case f(x)≤f(y), and endpoint ambiguity was already settled by well-definedness.
The function f is continuous.
On each closed rank-n ternary interval I, f varies by at most 2−n: if a 1 occurs among the n digits the tails vanish and f is exactly constant on I; otherwise f=∑k≤n​(ck​/2)2−k+tail with the tail between 0 and 2−n.
Let fn​ be the continuous piecewise-linear interpolant of f at the endpoints k/3n.
For x in a rank-n interval [l,r], both f(x) and fn​(x) lie in [f(l),f(r)] (by monotonicity), an interval of length at most 2−n.
Hence fn​→f uniformly, and a uniform limit of continuous functions is continuous, so f is continuous on [0,1].
Note f(0)=0 and f(1)=1 (reading 1=0.222…3​).