$$P(A_n)=P \left( \bigcup_{i=1}^{2^n-1} \left [ \frac{2i-1}{2^n}, \frac{2i}{2^n} \right ] \right)=\sum_{i=1}^{2^n-1}P\left( \left [ \frac{2i-1}{2^n}, \frac{2i}{2^n} \right ] \right)=\sum_{i=1}^{2^n-1} \left( \frac{2i}{2^n}-\frac{2i-1}{2^n} \right)=\sum_{i=1}^{2^n-1} \frac{1}{2^n} =\frac{1}{2^n} \sum_{i=1}^{2^n-1} 1=\frac{2^n-1}{2^n}$$