#Understanding upper bound of a harmonic sum

15 messages · Page 1 of 1 (latest)

winter mulch
#

Hi, I'm currently reading a book on competitive programming, and I came across this particular formula.

What I do not understand is how log_2(n) + 1 is the upper bound

safe swallowBOT
hot pendant
#

think of this like packets or groups

proven sage
wicked lilyBOT
#

woody6978

rotund swallow
wicked lilyBOT
#

Azyrashacorki

rotund swallow
#

So you'll have one group for every power of 2 below that, which means that the exponents in the denominators will be 0, 1, 2, ... , log_2(n).

#

(Maybe floor the last one)

#

Then you get log_2(n) + 1 groups

winter mulch
#

waiiiit i got it

#

thanks

#

!close

#

.close