First time doing for loops (way beginner, I know). Here's the full instructions for this problem:
Write a program that computes the values of the sum
(1 +.5 + .33 +.25 + … 1/n) - ln(natural log)n
for 100<n<1000 with the step
of 100. Output should be arranged as a table.
The only part I can't wrap my head around is making a for loop that doesn't merely raise the denominator of a fraction each time around, but includes the fractions of smaller denominators. I.e. when n=3 it doesn't simply do (1 + 1/3) - log(3), but (1 + 1/2 + 1/3) - log(3). Will it take more than one loop?