We have a continuous and increasing function $f:[0,1]\to \mathbb R$ and the sequence $(a_n)_{n\ge1}$,$$a_n=\frac{1}{2^n}\sum_{k=1}^{2^n}f\biggl(\frac{k}{2^n}\biggl)$$ . Knowing that there exists $p\in \mathbb N^*$ s.t. $a_p=\int_0^1f(x)dx$, prove that f is constant.
I've found that $\int_0^1f(x)dx=a_p\ge a_{p+n}\ge \int_0^1f(x)dx $ because $a_n$ is decreasing (proof here: $a_n=\frac{1}{2^n}\sum_{k=1}^{2^n}f\biggl(\frac{k}{2^n}\biggl)$ is decreasing ) and since the integral is the limit of $a_{p+n}$, the limit has to be smaller than it.
So $a_{p+n}=\int_0^1f(x)dx ,\forall n\in \mathbb N$.
I don't know what can I do next.Can somebody help me,please?