Given integers a, b and c, I am trying to find n<=b−1 such that this inequality holds : sum_(i=0)^(n)(a)/(b - i) <= c <= sum_(i=0)^(n+1)(a)/(b-i) That is to say : the largest n up to which the sum is the closest to c . Since : sum_(i=0)^(n)(a)/(b-i)=a*(sum_(i=0)^(b)(1)/(i)-sum_(i=0)^(b-n-1)(1)/(i)) And sum_(i=0)^k 1/i=H_k where H_k is the k-th harmonic number, We can rewrite the inequality into : a(H_b−H_(b−n−1))<=c<=a(H_b−H_(b−n−2)) How to find a tight lower and upper bound for n, such that this inequality holds ?
Aleah Booth
Answered question
2022-07-17
Inequality involving sum with parameter in denominator (leading to harmonic number problem) Given integers , and , I am trying to find such that this inequality holds :
That is to say : the largest up to which the sum is the closest to Since :
And where is the -th harmonic number, We can rewrite the inequality into :
How to find a tight lower and upper bound for , such that this inequality holds ?
Answer & Explanation
agyalapi60
Beginner2022-07-18Added 17 answers
Let us rewrite the inequality as
where and is defined by for in . Thus, one can view as the rectangle method of numerical integration applied to . Since is strictly increasing, one has
By summation over , one obtains for all
where the integral is given by . Let us examine two cases: if is larger than , then no such can be found. Taking insures only. else, we can find such that the first inequality is satisfied. If , then . Therefore,
where denotes the floor function. Otherwise, , and