\(f\left(x\right)=x+x^2+.......+x^{18}\)
\(\Leftrightarrow f\left(3\right)=3+3^2+........+3^{18}\)
\(\Leftrightarrow3.f\left(3\right)=3^2+3^3+.......+3^{19}\)
\(\Leftrightarrow3.f\left(3\right)-f\left(3\right)=\left(3^2+3^3+......+3^{19}\right)-\left(3+3^2+......+3^{18}\right)\)
\(\Leftrightarrow2.f\left(3\right)=3^{19}-3\)
\(\Leftrightarrow f\left(3\right)=\dfrac{3^{19}-3}{2}\)