Ta có:
\(S=3.2^0-3^1+3.2^1-3^2+3.2^2+3.2^3-3^3+3.2^4-3^4+...-3^7+3.2^{10}+3.2^{11}-3^8+3.2^{12}\)
\(=3.\left(2^0+2^1+2^2+2^3+2^4+...+2^{10}+2^{11}+2^{12}\right)-\left(3^1+3^2+3^3+...+3^7+3^8\right)\)
Đặt: \(A=2^0+2^1+2^2+...+2^{11}+2^{12}\)
=> \(2.A=2^1+2^2+2^3+...+2^{12}+2^{13}\)
=> \(2.A-A=2^{13}-2^0\)
\(\Rightarrow A=2^{13}-1=8191\)
Đặt: \(B=3^1+3^2+3^3+...+3^8\)
\(\Rightarrow3.B=3^2+3^3+3^4+...+3^9\)
=> \(3B-B=3^9-3^1=19680\)
=> \(2B=19680\Rightarrow B=9840\)
=> S=3.A-B=3.8191-9840=14733