\(A=3+3^2+3^3+...+3^{2016}\)
\(\Rightarrow3A=3^2+3^3+3^4+...+3^{2017}\)
\(\Rightarrow3A-A=\left(3^2+3^3+3^4+...+3^{2017}\right)-\left(3+3^2+3^3+...+3^{2016}\right)\)
\(\Rightarrow2A=3^{2017}-3\)
Ta có : \(2A+3=3^n-1\Rightarrow3^{2017}-3+3=3^n-1\)
\(\Rightarrow3^{2017}=3^{n-1}\Rightarrow n-1=2017\Rightarrow n=2018\)
Vậy : n = 2018