problem
Can you paint the real number line using three colors such that
- each real number is in a non-trivial interval (singletons not allowed) that is painted a single color; and
- between any two points of different colors, there is a point that is the third color?
- all three colors must be used
current attempts thus far:
approach 1
- Color all unit intervals $[N,N+1)$ red (where $N$ is an integer).
- Remove the right 1/3 (in absolute distance, not in proportion) of each interval and replace it with a blue interval that is closed on the left and open on the right.
- Remove the right 1/9 (in absolute distance, not in proportion) of each interval and replace it with a green interval that is closed on the left and open on the right.
- Remove the right $\frac{1}{3^n}$ (in absolute distance, not in proportion) of each interval and replace it with the "other" color.
At step 4 we recurse forever.
approach 2
Encode the real number line in base 7 and if first odd digit in the decimal expansion after the decimal point is a 1 then make the number red, if it's 3 then green, if it's 5 then blue.
problems with these approaches
Approach 1 has a countable infinity of points where the color is not defined. Consider 1/2 which is at the right side of one of the original red intervals and is open on the right. It's at the closed left side of an infinitesimally small interval that is green or blue... or is it, the recursion is constantly changing the colors back and forth.
Approach 2 has an uncountable(?) infinity of points where the color is undefined, the set of all points that a decimal expansion composed entirely of even digits.

It is not possible to do so.
First, all of the (maximal) monochrome intervals have to be closed intervals. (For the purposes here, $[a,+\infty)$ and $(-\infty,a]$ are considered closed intervals.)
This is because if, for some real $a,$ $(a,b]$ or $(a,b)$ is a maximal monochrome interval, then $a$ has a different color, and there is no element between $a$ and any $x\in(a,b)$ of the third color.
So, if we are to construct such a coloring, it means we have to cover the real line with disjoint non-trivial closed intervals.
But according to this link, it is impossible to cover the real line with disjoint non-trivial closed intervals.
The proof there is that if there is such a covering, then the set $E$ of endpoints of the intervals is countably infinite, closed, and every element of $E$ is a limit point of $E.$ Those are all relatively easy to show.
$E$ is closed. Let the intervals be $[a_n,b_n].$ Then $\bigcup (a_n,b_n)$ is open, and $E$ is the complement.
$E$ is countable. This is because we can pick distinct rationals from each interval, and thus we must have countably many intervals. There are at most $2$ endpoints per interval ($(-\infty,a]$ and $[a,+\infty)$ only have one.)
If $[a,b]$ is an interval, then for any $n,$ pick $x\in (a-1/n,a).$ Then $x\in[a_n,b_n]$ for another interval. But then $a-1/n<x\leq b_n$ and $b_n<a,$ so $b_n\in (a-1/n,a).$ $b_n\to a.$ Likewise for sequences of left-endpoints converging to $b.$
That means $E$ is a countably infinite "perfect set," and the Baire Category Theorem says there is no such thing in a complete metric space.
We can prove it directly. Outlined here.
Let $E=\{x_1,x_2,\dots\}$ be an enumeration of the endpoints.
The proof finds a sequence of closed balls $B_n$ (intervals in our case) such that $B_{n+1}\subseteq B_n$ and $B_n$ does not contain any of $x_1,\dots,x_n,$ the radius of $B_{n+1}$ is at most $1/2$ the radius of $B_n$, and $B_{n+1}$ is centered on another element of $E.$
Then the intersection of the closed intervals $B_n$ cannot have any element of $E,$ but the centers are a Cauchy sequence, and thus must converge, which, since $E$ is closed, must be contained in $E.$