Formula for sigma notation