S = 2 + 22 + ... + 2150
= ( 2 + 22 + 23 + 24 + 25 ) + ( 26 + 27 + 28 + 29 + 210 ) + ... + ( 2146 + 2147 + 2148 + 2149 + 2150 )
= 2.(1+2+22+23+24) + 26.(1+2+22+23+24) + ... + 2146(1+2+22+23+24)
= 2.31 + 26.31 + ... + 2146.31
= 31.(2+26+...+2146) chia hết cho 31