[tex] \displaystyle\\1+2+2^2+2^3+\hdots + 2^{n-1}=1023\\\\\text{Calculam suma termenilor sirului.}\\\\1+2+2^2+2^3+\hdots + 2^{n-1} = \\\\= 2^0+2^1+2^2+2^3+\hdots + 2^{n-1}=\frac{2^{n-1+1}-1}{2-1}=\boxed{2^n-1}\\\\\text{Rezolvam ecuatia:}\\\\2^n-1=1023\\\\2^n=1023+1\\\\2^n=1024\\\\\text{Numarul 1024 este o putere a lui 2.}\\\\2^n=2^{10}\\\\\Longrightarrow~~~\boxed{\bf n=10} [/tex]