Riemann-integrable functions and pointwise convergence 
Hello, I was hoping for some advice on finding a function which will satisfy this. I think I am okay with the actual execution of the answer, but I don't know how I'm supposed to find a suitable function.
Thank you

Hint: Let $\{r_n\}_{n\in\Bbb N}$ be an enumeration of the rationals in $[0,1]$, that is $$\{r_n\}_{n\in\Bbb N} =\Bbb Q\cap [0,1].$$
Define $g_n:[0,1]\to \Bbb R$ by $$g_n(x)=\begin{cases} 1 &\text{if $x\in \{r_1,\ldots,r_n\}$} \\ 0 &\text{otherwise} \end{cases}$$
Each $g_n$ is Riemann integrable. The function $g$ to which $\{g_n\}$ converges is one of the first examples of a non Riemann integrable function.
