Nếu B chia hết cho 21 suy ra B chia hết cho 3,7
B=( 2+2^2)+(2^3+2^4)+......+( 2^9+2^30)
= 2(1+2)+2^3(1+2)+.......+2^9(1+2)
=2.3+2^3.3+....+2^29.3
=3(2+2^3+........+2^29) chia hét cho 3
B=(2+2^2+2^3)+.....+(2^28+2^29+2^30)
=2(1+2+2^2)+........+2^28(1+2+2^2)
=2.7+.....+2^28.7
=7(2+......+2^28) chia hết cho 7
Vậy B chia hết cho 7