S = 1 + 3 + 32 + 33 + ... + 330
3S = 3 + 32 + 33 + 34 + ... + 331
3S - S = ( 3 + 32 + 33 + 34 + ... + 331 ) - ( 1 + 3 + 32 + 33 + ... + 330 )
2S = 331 - 1
S = \(\frac{3^{31}-1}{2}\)
\(S=1+3+3^2+3^3+...+3^{30}\)
\(S=1+3\left(1+3^2+...+3^{29}\right)\)
\(S=1+3\left(S-3^{30}\right)\)
\(S=1+3S-3^{31}\)
\(2S=3^{31}-1\)
\(S=\frac{3^{31}-1}{2}\)
\(N=1+4+4^2+...+4^{132}=1+4\left(1+4^2+...+4^{131}\right)\)
\(N=1+3\left(N-4^{132}\right)\)
\(N=1+3N-4^{133}=\frac{4^{133}-1}{2}\)