a1=1=2^1 -1
a2=1+2=3=2^2 -1
a3=1+2+4=7=2^3 -1
a4=1+2+4+8=15=2^4 -1
.
an=2^n -1
Sn=a1+a2+a3+a4+.+an
=2^1 -1+2^2 -1+2^3 -1+2^4 -1+.+2^n -1
=(2^1+2^2+2^3 +.+2^n) -n
=[2^(n+1)-2]-n
=2^(n+1) -n-2
a1=1=2^1 -1
a2=1+2=3=2^2 -1
a3=1+2+4=7=2^3 -1
a4=1+2+4+8=15=2^4 -1
.
an=2^n -1
Sn=a1+a2+a3+a4+.+an
=2^1 -1+2^2 -1+2^3 -1+2^4 -1+.+2^n -1
=(2^1+2^2+2^3 +.+2^n) -n
=[2^(n+1)-2]-n
=2^(n+1) -n-2