Riemann integrability of indicator function Let $f:[0,1] \to \mathbb{R}$ be the indicator function $I_A(x)$ of $A$, where $A=\{x \in [0,1] : x\text{ has a base-3 expansion containing a 1} \}$.
Is $f$ Riemann integrable?
It would seem I need to establish whether the elements of $A$ and $[0,1]-A$ are dense in $[0,1]$?
 A: This isn't that hard to show from the definition of the Riemann integral - well, not hard as compared to doing anything directly from the definition, which is a rather high point of comparison.
I don't know which definition of the Riemann integral you are working with. The one that makes this simplest is that $\int_a^b g(t)\,dt = L$ if for every $\epsilon > 0$ there is a partition $P$ such that for every refinement $P'$ of $P$, the Upper and Lower Riemann sums of $g$ over $P'$ are within $\epsilon$ of $L$.
The first thing to note is that for any partition of $[0,1]$, the upper Riemann sum of $f$ is $\le 1$ (in fact, it is $=1$, but we don't need that). On the other hand, if $P'$ is a refinement of $P$, then the lower sum $L(f, P') \ge L(f,P)$.
So it will follow that $\int_0^1 f(t)\,dt = 1$ if we can show the existence of partitions $P_n$ such that $\lim_{n\to\infty} L(f,P_n) = 1$. For that, let $$P_n = \left\{\dfrac m{3^n}\mid m \in \Bbb N, m \le 3^n\right\}$$
What is important about these partitions is that on each of the intervals $\left[\frac m{3^n}, \frac {m+1}{3^n}\right]$, the first $n$ trits ("trinary digits") to the right of the radix ("decimal point") in the trinary expansions do not change. (Note that the partition points other than $0$ are exactly the numbers with two trinary expansions, one of which agrees with the lower interval, the other of which agrees with the upper interval.) So if there is a $1$ trit in those first $n$, the entire interval will be in $A$, so $f = 1$ on the interval. Therefore the lower Riemann sum over such intervals will be the sum of the interval widths. The intervals of $P_n$ that do not have a $1$ in the first $n$ trits will all contain at least one point with no $1$ trits in their expansion, so the lower sum over them will be $0$. Thus the lower Riemann sum over the entire partition will be the sum of the widths of the intervals with a $1$ in the first $n$ trits.
$\frac 23$ of the intervals will not have a $1$ as their first trit. And $\frac 23$ of those will also not have a $1$ as their second trit, and so on. In the end, $\left(\frac 23\right)^n$ of the $3^n$ intervals in $P_n$, or $2^n$ total, have no $1$s anywhere in the first $n$ trits. Since each interval has width $\frac 1{3^n}$, the total width of those intervals is $\left(\frac 23\right)^n$, and the total widths of the intervals with a $1$ trit is therefore $1-\left(\frac 23\right)^n$. That is,
$$L(f,P_n) = 1-\left(\frac 23\right)^n$$
Clearly $\lim_{n\to\infty} L(f,P_n) = 1$, which completes the proof.
