hi!

I'm looking for a strictly increasing function on I = [0, 1] that is continuous only at the irrational numbers in I.

After some thought, I came up with the following arrangement.

Enumerate the rational numbers in I as such: (with n a natural number) such that

Let if (for 1 <= k <= n)

and if x is irrational and

Is the function continuous at x irrational? I think so.

For any Epsilon > 0, choose Delta = so that for any x' satisfying we have .

Is the function discontinuous at x rational? I think that can be shown using similar reasoning.

Am I close? If not, can I modify my function to meet the requirement?