ta có \(2018:5\) dư \(3\)
\(\Rightarrow A=1+2^1+2^2+2^3+...+2^{2018}\)
\(=1+2^1+2^2+\left(2^3+2^4+2^5+2^6+2^7\right)+...+\left(2^{2014}+2^{2015}+2^{2016}+2^{2017}+2^{2018}\right)\)
\(=7+2^3\left(1+2^1+2^2+2^3+2^4\right)+...+2^{2014}\left(1+2^1+2^2+2^3+2^4\right)\)
\(=7+2^3\left(31\right)+...+2^{2014}\left(31\right)=7+\left(2^3+...+2^{2014}\right).31\)
\(\Rightarrow A\) chia cho \(31\) thì dư \(7\)
vậy \(A\) chia cho \(31\) thì số dư là \(7\)