Can we make the inequality $A-B \leq \frac{A^2}{4}$ strict? I have an interesting problem:
Given that $$
A=\frac{1}{2022}\left(1+\frac{1}{2}+\frac{1}{3}+\cdots+\frac{1}{2022}\right)$$
$$B=\frac{1}{2023}\left(1+\frac{1}{2}+\frac{1}{3}+\cdots+\frac{1}{2023}\right)
$$
I got an upper bound on $A-B$.The Lower bound is zero, that is $A-B>0$ is easy to prove.For the upper bound , here is my analysis:
$$\text{Let}\:H=\sum_{k=1}^{2022}\frac{1}{k}$$
So we have $$2022=\frac{H}{A} \implies 2023=\frac{H+A}{A}$$
So $$B=\frac{H+\frac{1}{2023}}{2023}=\frac{\left(H^2+A H+A\right) A}{(H+A)^2}$$
Finally we get a quadratic in $H$ as:
$$(A-B) H^2+\left(A^2-2 A B\right) H+A^2(1-B)=0$$ and since $H \in \mathbb{R}$ the discriminant should be non negative.
So we have
$$(A^2-2AB)^2-4(A-B)A^2(1-B)\geq 0$$
Simplifying we get
$$A-B \leq \frac{A^2}{4}$$
Now is it possible to make it strict?
EDIT: After deep thinking i came to the conclusion that inequality should be strict:
It is evident that $A<2, B<1$
Let us assume equality holds true, that is $$A-B=\frac{A^2}{4}$$
So we get
$$(A-2)^2=4(1-B) \implies A=2-2\sqrt{1-B}$$
Now i am pretty sure that $\sqrt{1-B}$ is irrational. So that makes $A$ irrational, which contradicts that $A$ is rational. Hence the inequality is strict.
 A: $$\frac{A-B}{A^2}<\frac{A-\frac H{2023}}{A^2}=\frac{2022}{2023\,H}<\frac1H<\frac14$$
because
$$H=H_{2022}>H_{55}>\ln(55)>4.$$
A: If $\;A-B=\dfrac{A^2}4\;,\;$ then , by solving the quadratic equation in $H$, we get that $\;H=2-A\;,\;$ hence ,
$H=\dfrac{4044}{2023}<2<1+\dfrac12+\dfrac68<H_8<H_{2022}=H\;.$
So, $\;A-B\neq\dfrac{A^2}4\;,\;$ consequently ,$\;\;A-B<\dfrac{A^2}4\,.$
A: Your proof for the $A-B \le A^2/4$ is correct, but for the strict inequality, the irrationality of $\sqrt{1-B}$ is needed, which is not obvious (at least not to me).
Here is a different approach which gives the strict inequality without the need to argue about irrational numbers. It works for an arbitrary number of terms:

Let $$a_n = \frac 1 n \left( 1 + \frac 12 + \cdots + \frac 1 n\right) $$ for positive integers $n$. Then $$a_n - a_{n+1} \le \frac 14 a_n^2 \, .$$ The inequality is strict for all $n \ge 2$.

Proof: We have
$$
 a_{n+1} = \frac{1}{n+1}\left( n a_n + \frac{1}{n+1}\right) \\
\implies a_n - a_{n+1} = \frac{a_n}{n+1} - \frac{1}{(n+1)^2} 
$$
and therefore
$$
 \frac 14 a_n^2 + a_{n+1}- a_n = \frac 14 a_n^2 - \frac{a_n}{n+1} + \frac{1}{(n+1)^2} = \frac{((n+1)a_n - 2)^2}{4(n+1)^2} \underset{(*)}{\ge} 0 \, .
$$
For $n \ge 2$ is
$$
 \frac{1}{a_n} = \frac{n}{ 1 + \frac 12 + \cdots + \frac 1 n}
< \frac {1 + 2 + \ldots + n}n = \frac{n+1}{2}
$$
from the inequality between the harmonic and arithmetic mean, so that $(n+1)a_n > 2$, and the inequality $(*)$ is strict.
