def sissa(n): s=0 for k in range(1,n+1): grain=2**(k-1) s=s+grain return(s)