M=1+3+32+33+34+...+398+399+3100
M=(1+3+32)+(33+34+35)+...+(398+399+3100)
M=(1+3+32)+33(1+3+32)+...+398(1+3+32)
M=13+33.13+...+398.13
M=13(1+33+...+398) chia hết cho 13
=> M chia cho 13 dư 0
Vậy M chia cho 13 dư 0
M có 101 số
M=1+3+3^2+.....+3^100
M=(1+3+3^2)+(3^3+3^4+3^5)+......+(3^96+3^97+3^98)+3^99+3^100
M=13+3^3.(1+3+3^2)+...+3^96.(1+3+3^2)+3^99+3^100
M=13.1+3^3.13+.......+3^96.13+3^99+3^100
M=13.(1+3^3+...+3^96)+3^99+3^100
=>M:13 dư 3^99+3^100
Vậy M:13 dư 3^99+3^100