\(B=3^{100}-3^{99}+3^{98}-3^{97}+...+3^2-3+1\)
\(\Rightarrow3B=3^{101}-3^{100}+3^{99}-3^{98}+...+3^3-3^2+3\)
\(\Rightarrow3B+B=\left(3^{101}-3^{100}+3^{99}-3^{98}+...+3^3-3^2+3\right)+\left(3^{100}-3^{99}+3^{98}-3^{97}+...+3^2-3+1\right)\)
\(\Rightarrow4B=3^{101}-3\)
\(\Rightarrow B=\frac{3^{101}-3}{4}.\)
Vậy \(B=\frac{3^{101}-3}{4}.\)
Chúc bạn học tốt!