Find a function $f:\Bbb R \to \Bbb R$ which is discontinuous at $1,\frac 12,\frac 13, ... $ but is continuous at every other point 
(a) Find a function $f:\Bbb R \to \Bbb R$ which is discontinuous at $1,\frac 12,\frac 13, ... $ but is continuous at every other point.
(b) Find a function $f:\Bbb R \to \Bbb R$ which is discontinuous at $1,\frac 12,\frac 13, ... $and $0$ but is continuous at every other point.


I am personally fond of $$f(x)=\left\lfloor \frac 1 x\right\rfloor^{-1}$$
for $0< x\leq 1$ and zero elsewhere.
This is discontinuous at every $n^{-1}$ but continuous at zero. 
To make it disccontinuous at zero, just ask that $f(0)=1$, and you're done. Here's "full" plot of the function over $[-1,1]$. Note, however, it is undefined at $x=0$.


ADD There is a very nice way of constructing, given a sequence $\{x_n\}$ of real numbers, a function which is continuous everywhere except the elements of $\{x_n\}$. Let $\{c_n\}$ by any nonnegative summable sequence, and let $$s(x)=\sum_{x_n<x} c_n$$
What we do is sum through the indices that satisfy the said inequality. Because of absolute convergence, order is irrelevant. The function is monotone increasing because the terms are nonnegative, and $s$ is discontinuous at each $x_n$ because $$s(x_n^+)-s(x_n^-)=c_n$$
However, it is continuous at any other $x$: see xzyzyz's proof with the particular case $c_n=n^{-2}$. In fact, this function is lower continous, in the sense $f(x^-)=f(x)$ for any value of $x$. If we had used $x_n\leq x$, it would be upper continuous, but still discontinuous at the $x_n$.
To see the function has the said jumps, note that for $h>0$, we have $$\begin{align}\lim_{h\to 0^+} s(x_k+h)-s(x_k-h)&=\lim_{h\to 0^+}\sum_{x_n<x_k+h} c_n-\sum_{x_n<x_k-h}c_n\\&=\lim_{h\to 0^+}\sum_{x_k-h\leq x_n<x_k+h} c_n\end{align}$$
and we can take $\delta$ so small that whenever $0<h<\delta$, for any given $x_m\neq x_k$, $x_m\notin [x_k-\delta,x_k+\delta)$, so the only term that will remain will be $c_k$, as desired.
