Show that any function $f$ which is not continuous on $[a,b]$, but satisfies the intermediate value property, assumes some value infinitely often.
Here $f$ has the intermediate value property if:
whenever $(c,d)$ is a subinterval of $[a,b]$, $f$ achieves every value between $f(c)$ and $f(d)$.
I am close to the answer here. I know there exists an $\epsilon$ such that for all $\delta_n = {1\over n}$ we have an $x_n$ such that $|x_n-x_0|<1/n$ but $|f(x_n)-f(x_0)| \geq \epsilon$, where $f$ is not continuous at $x_0$.
I'd like to be able to say that we can select these $x_n$ so that $(f(x_n))$ is a sequence of distinct elements, and then somehow proceed. How should I do this, and is this the correct way to go?