TeX source:
{\displaystyle 2\left(B-1\right)\left(B^{P-1}\right)\left(U-L+1\right)+1}