A=(1+2+2^2)+...+2^5004(1+2+2^2)
=7(1+...+2^5004) chia hết cho 7
Ta có: 1+2+22+23+...+25006
= ( 1+2+22)+( 23+24+25)+...+( 25004+25005+25006)
= ( 1+2+22)+23.(1+2+22 )+...+ 25004.(1+2+22)
= 1.7+23.7 + ... + 25004.7
= 7 . ( 1+...+ 25004) chia hết cho 7
=> 1+2+22+23+...+25006 chia hết cho 7 ( dcpcm)