def sigma(x): a = 0 for i in range(x+1): a += i return a