[tex]\displaystyle 1+3+5+7+...+1023 \\ \\ 1023=1+(n-1) \times 2 \\ \\ 1023=1+2n-2 \\ \\ 2n=1023-1+2 \\ \\ 2n=1024 \\ \\ n= \frac{1024}{2} \\ \\ n=512[/tex]
[tex]\displaystyle S_{512}= \frac{2+511 \times 2}{2} \times 512 \\ \\ S_{512}= \frac{2+1022}{2} \times 512 \\ \\ S_{512}= \frac{1024}{2} \times 512 \\ \\ S_{512}=512 \times 512 \\ \\ S_{512}=262144[/tex]