Cantor Function Question I am looking for an explicit expression for the Cantor function for points in the cantor set. Does anyone know of one?
Thanks
 A: As Brian was alluding to, the canonical Cantor Function is discussed/defined at the linked Wikipedia entry. You'll find the following algorithm for the function:

Formally, the Cantor function $c : [0,1] → [0,1]$ is defined as follows:

Express x in base 3.
If x contains a 1, replace every digit after the first 1 by 0.
Replace all 2s with 1s.
Interpret the result as a binary number. The result is c(x).

...And some alternative definitions.
A: Define the Cantor function $ f:[0,1]\rightarrow [0,1] $ as follows.
Let $ x\in [0,1] $.
Then $$ x= \sum\limits_{n = 1}^\infty  \frac{a_n}{3^n}\text{ ; where }a_{n}\in \{0,1,2\}\text{ for each } n\in \mathbb{N}. $$
If $ x\in C $ then $ x $ can be written as of the form $$ \sum\limits_{n = 1}^\infty  \frac{a_n}{3^n}\text{ ; where }a_{n}\in \{0,2\}\text{ for each } n\in \mathbb{N} $$ and then we define $$ f(x)=f(\sum\limits_{n = 1}^\infty  \frac{a_n}{3^n})=\sum\limits_{n = 1}^\infty  \frac{a_n}{2^{n+1}}. $$
If $ x\notin C $ then there exists $ n_{0}\in \mathbb{N} $ such that $ a_{n_{0}}=1 $.
Put $ N=\min \{n_{0}\in \mathbb{N}:a_{n_{0}}=1\} $.
If $ N=1 $ then define $$ f(x)=\dfrac{1}{2} $$ and otherwise we define  $$ f(x)=f(\sum\limits_{n = 1}^\infty  \frac{a_n}{3^n})=\sum\limits_{n = 1}^{N-1}  \frac{a_n}{2^{n+1}}+\dfrac{1}{2^{N}}. $$
