def Sigma3(n): k = 1 S = 0 while k <= n: S = S + 1 / k k = k + 1 return S