Solution (source code)

= Solution

As $x\to+\infty$, <big O notation> means
$$
\boxed{f=O(g)\iff\exists C>0\ \exists x_0\ \forall x\geq x_0:\ |f(x)|\leq C|g(x)|.}
$$
The same constant must work on the entire sufficiently large tail. Absolute values accommodate signed functions. A two-sided convention at infinity would replace $x\geq x_0$ by $|x|\geq x_0$; the positive-integer arguments in the later parts use the positive-tail convention.