@staticmethod
def _termial_function(n: int) ->int:
    """Compute termial function, with red hats off to Donald Knuth.

        Termial function is:

          \\sum_{k=0}^n k

        Let's use arithmetic progression to get termial of n.
        """
    if n < 0:
        raise ValueError('Termial function used with negative number')
    return int((1 + n) * (n / 2))
