\(S=\left(-\frac{1}{7}\right)^0+\left(-\frac{1}{7}\right)^1+...+\left(-\frac{1}{7}\right)^{2017}\)
\(-\frac{1}{7}S=\left(-\frac{1}{7}\right)^1+\left(-\frac{1}{7}\right)^2+...+\left(-\frac{1}{7}\right)^{2018}\)
\(S-\left(-\frac{1}{7}S\right)=\left[\left(-\frac{1}{7}\right)^0+\left(-\frac{1}{7}\right)^1+...+\left(-\frac{1}{7}\right)^{2017}\right]-\left[\left(-\frac{1}{7}\right)^1+\left(-\frac{1}{7}\right)^2+...+\left(-\frac{1}{7}\right)^{2018}\right]\)
\(S+\frac{1}{7}S=\left(-\frac{1}{7}\right)^0-\left(-\frac{1}{7}\right)^{2018}\)
\(\frac{8}{7}S=1+\left(\frac{1}{7}\right)^{2018}\)
\(S=\frac{1+\frac{1}{7^{2018}}}{\frac{8}{7}}=\frac{\left(1+\frac{1}{7^{2018}}\right).7}{8}\)