The following question is taken from the practice set of JEE exam.
If $| f(p + q) – f(q)| \le \dfrac pq$ for all $p$ and $q \in \mathbb Q$ & $q \ne 0$, show that $\sum_{i=1}^k| f(2^k ) – f(2^i ) |\le \dfrac{k(k – 1)}2$
$| f(2^k ) – f(2^1 ) |\le \dfrac{2^k-2}{2}=2^{k-1}-1$
$| f(2^k ) – f(2^2 ) |\le \dfrac{2^k-2^2}{2^2}=2^{k-2}-1$
.
.
.
$| f(2^k ) – f(2^{k-1} ) |\le \dfrac{2^k-2^{k-1}}{2^{k-1}}=2^1-1$
Adding all this, we get the required LHS$\le(2+2^2+...2^{k-1})-(k-1)=2(2^{k-1}-1)-k+1=2^k-k-1$
How to get the desired RHS?
Hint: For all $q\in\mathbb{Q}\setminus\{0\}$, $|f(2q) - f(q)| \le 1$, so for all $n\in\mathbb{N}$, $|f(2^n q) - f(q)| \le n$. (Why?)