I am reproducing my quora answer verbatim.
I am not sure how someone can do this under 4 minutes! Initially I tried expanding the square into a double sum & pulling the integral inside, but it turned out to be extremely tedious. Here's an approach that works:
$\displaystyle \begin{align*} \mathcal{I} & =\ \int _{0}^{1}\left(\sum _{n=1}^{\infty }\frac{\lfloor 2^{n} x\rfloor }{3^{n}}\right)^{2}\mathrm{d} x\\ & =2\int _{0}^{\frac{1}{2}}\left(\sum _{n=1}^{\infty }\frac{\lfloor 2^{n+1} x\rfloor }{3^{n}}\right)^{2}\mathrm{d} x\tag{01}\\ & =2\int _{0}^{\frac{1}{2}}\left( 3\cdotp \sum _{n=1}^{\infty }\frac{\lfloor 2^{n+1} x\rfloor }{3^{n+1}}\right)^{2}\mathrm{d} x\\ & =18\underbrace{\int _{0}^{\frac{1}{2}}\left(\sum\limits _{n=1}^{\infty }\frac{\lfloor 2^{n} x\rfloor }{3^{n}}\right)^{2}\mathrm{d} x}_{\mathcal{J}}\tag{02} \end{align*}$
Also, we can split $\mathcal I$ at the point $x=1/2$.
$\displaystyle \begin{align*} \mathcal{I} & =\mathcal{J} +\int _{\frac 12}^{1}\left(\sum\limits _{n=1}^{\infty }\frac{\lfloor 2^{n} x\rfloor }{3^{n}}\right)^{2}\mathrm{d} x\\ & =\mathcal{J} +\int _{0}^{\frac 12}\left(\sum\limits _{n=1}^{\infty }\frac{\lfloor 2^{n} x+2^{n-1} \rfloor }{3^{n}}\right)^{2}\mathrm dx\tag{03}\\ & =\mathcal{J} +\int _{0}^{\frac 12}\left(\sum\limits _{n=1}^{\infty }\frac{\lfloor 2^{n} x\rfloor }{3^{n}} +\frac 13\cdot\sum\limits _{n=0}^{\infty }\left(\frac{2}{3}\right)^{n}\right)^{2}\mathrm dx\\ & =\mathcal{J} +\int _{0}^{\frac 12}\left(\sum\limits _{n=1}^{\infty }\frac{\lfloor 2^{n} x\rfloor }{3^{n}} +1\right)^{2}\mathrm dx\\ & =2\mathcal{J} +2\underbrace{\int _{0}^{\frac 12}\sum\limits _{n=1}^{\infty }\frac{\lfloor 2^{n} x\rfloor }{3^{n}}\mathrm{d} x}_{\mathcal{K}} +\frac{1}{2}\\ & =\frac{\mathcal{I}}{9} +2\mathcal{K} +\frac{1}{2} \tag{04}\\ &=\frac 98\left(2\mathcal K +\frac 12\right) \end{align*}$
Now $\mathcal K$ is relatively easy to solve.
$\displaystyle \begin{align*}\mathcal K &= \int _{0}^{\frac 12}\sum\limits _{n=1}^{\infty }\frac{\lfloor 2^{n} x\rfloor }{3^{n}}\mathrm{d} x\\ &=\sum_{n=1}^\infty\frac{1}{3^n}\int_{0}^{\frac 12}\lfloor 2^n x\rfloor \mathrm dx\\ &= \sum_{n=1}^\infty\frac{1}{3^n\cdot 2^n}\int_0^{2^{n-1}}\lfloor x\rfloor\mathrm dx\tag{05}\\ &= \sum_{n=1}^\infty\frac{1}{2^n\cdot 3^n}\cdot \frac{2^{n-1}\left(2^{n-1}-1\right)}{2}\tag{06}\\ &=\frac 1{12}\sum_{n=1}^\infty\left\{\left(\frac 23\right)^{n-1}-\left(\frac{1}{3}\right)^{n-1}\right\}\\ &=\frac{1}8\end{align*}$
$\therefore \displaystyle \mathcal I = \frac 98\left(2\mathcal K +\frac 12\right)=\boxed{\frac {27}{32}}\tag*{}$
Explanation of the tagged steps:
- Replace $x$ by $2x$.
- This step is justified because $\lfloor 2^1x \rfloor=0 \ \forall \ x\in[0,1/2)$
- Replace $x$ by $x+1/2$.
- $\because \mathcal I = 18\mathcal J$ from $(02)$.
- Replace $x$ by $2^{-n}x$.
- $\displaystyle \because \int_0^n \lfloor x \rfloor \mathrm dx = \frac{n(n-1)}{2} \ \forall \ n \in \mathbb N$
Also note that there are several instances where I've applied the sum of infinite geometric series.
$\displaystyle \forall \ |r|<1, \ \sum_{n=0}^\infty r^n=\frac{1}{1-r}\tag*{}$