\(S=1+3+3^2+3^3+3^4+...+3^{99}\)
\(S=3^0+3^1+3^2+3^4+...+3^{99}\)
\(\Rightarrow S=3^0.\left(1+3+9+27\right)+...+3^{96}.\left(1+3+9+27\right)\)
\(\Rightarrow S=3^0.40+...+3^{96}.40\)
\(\Rightarrow S=\left(3^0+...+3^{96}\right).40⋮40\)
\(\Rightarrowđpcm\)
S=1+3+32+...+399
=(1+3+32+33)+.....+(396+397+398+399)
=1*(1+3+32+33)+....+396*(1+3+32+33)
=1*(1+3+9+27)+...+396*(1+3+9+27)
=1*40+....+396*40
=40*(1+...+396) chia hết 40
Đpcm