Consider a finite, simple and undirected graph $G=(V,E)$ with $V=\{v_1,\dots, v_n\}$. Let us also fix an integer $k> n/2$. What are we able to say about the following quantity:
$$\mathcal{I}_k(G) := \sum_{1\le i<j \le n} \mathbb{1}{\Big\{|\mathrm{deg}(v_i)-\mathrm{deg}(v_j)|\ge k}\Big\},$$ i.e. the number of all those pairs $(v_i,v_j)$ with degree difference greater or equal to $k$?
After some consideration, I am quite convinced that the following inequality is true:
\begin{equation} \mathcal{I}_k(G) \ \le \ k(n-k), \end{equation}
but I am stuck on actually proving it. What can be done, we can divide $V$ into the following parts $$A := \{v_i : \mathrm{deg}(v_i)\ge k\},$$ $$B := \{v_i : \mathrm{deg}(v_i)\le n-k\},$$ $$R=V\setminus(A\cup B).$$ Obviously, we can assume that $A$ is a clique and $B$ is an anticlique. So in the case of $|A|\ge k+1$ we get the bound directly - it is enough to erase all edges outside of $A$. The case of $|B|\ge k+1$ is similar. I am however stuck in the case of $\max(|A|, |B|)\le k$. I thought about rewriting $\mathcal{I}_k(G)$ as $$\mathcal{I}_k(G) = \sum_{i=k}^{n}|C_i|\sum_{j=0}^{i-k}|C_j|,$$ where $$C_i := \{v_j: \mathrm{deg}(v_j)=i \},$$ and using some kind of degree sequence criterion, such as Erdős–Gallai and similar.
But I did not succeed. I would be very grateful for any comment or insight. Maybe looking on this question, You will think of some other related problem or theorem that might be helpful. Maybe You are able to say what a general strategy might be appropriate to handle this problem. It may turn out that for some reason this problem is trivial but I have overlooked it. I will appreciate any help or advice.