Then the next row is gamma times each one, gamma log N + gamma squared + O of 1/N.
And the next term is O(1 over N) times all of them, O(1 over N),
log N over N gamma times O(1 over N) is O(1 over N), and
so O(1 over N) times O(1 over N), so O(1 over N) squared.
So that gives us nine terms but,
we can throw a lot of them out, because well first of all,
all the big O terms you just pick the largest one.
So, big O of 1 over N squared is much smaller than log N over N so
it can be [INAUDIBLE] in that.
Same with O of 1 over N, so all the big O terms and
there's five of them, get subsumed in that O of log n over n.
There's the gamma squared, and the gamma log N appears twice, so
that's an asymptotic series in the standard scale for
the square of the harmonic numbers.
Now just taking a look at this series,
it's important to note that there's a difference between
the first couple of terms and the big O that we lost.
So log N squared, so N is a million,
log N it’s going to be some small integer so
log N squared and 2 log N is not there not that far apart.
So it seems like were going to need those and the gamma squared is a constant,
but log N is a small integer is only a slight improvement in precision to carry
on those terms and so probably want those terms.
But when we get a divided by N,
that's when we have a huge improvement in precision.
Now, we can't always tell ahead of time, how far you have to go before you get this
big improvement, but in real problems it usually happens after three or
four terms and that's what happened here.
If you look the tables of these quantities, for N equals 100, I'm sorry,
1,000, 10,000 and 100,000, you can see,
so HN squared is the quantity that we're trying to estimate.
And then if you just try to estimate it with log N squared you can see it will
be off by fair amount 10% for even a 100,000.
If you add the 2 gamma log N you come much closer and add the gamma squared,
actually we're accurate to three decimal places because the next term,
the one that we're missing is going to differ.
It's going to be bounded by a constant times log N over N and for
100,000 that's going to be out in the fourth or
fifth decimal place, assuming the constant's small,
which normally we assume in these asymptotic series is they are.
But we can check as in this case that that's an accurate approximation.
So usually we'll try to carry it out long enough
until we get this big improvement in precision.