down vote Matlabs sum for $\displaystyle \sum_{n=1}^{10^5} \frac{1}{n}$ is actually quite spot on, it's not a fault of machine accuracy. The series is called the Harmonic series and is known to diverge very slowly. In fact, it behaves approximately like $\gamma + \ln n$ where $\gamma$ is the Euler-Mascheroni constant, about $0.57721.$