A = 1 + 2 + 22 + 23 + 24 + ... + 2n
2A=2(1 + 2 + 22 + 23 + 24 + ... + 2n)
2A=2+22+...+2n+1
2A-A=(2+22+...+2n+1)-(1+2+22+...+2n)
A=2n+1-1
B = 7 + 71 + 72 + 73 + 74 + .... + 7n+1
7B=7( 7 + 71 + 72 + 73 + 74 + .... + 7n+1)
7B=72+72+...+7n+2
7B-B=(72+72+...+7n+2)-(7+71+...+7n+1)
6B=7n+2-7-71
B=(7n+2-14)/4