def _should_add(element, progression, max_size):
    """Should an element be added to a progression?

    Specifically, if the progression has 0 or 1 elements, then add it,
    as this starts the progression. Otherwise check if the gap between
    the element and the last in the progression is the same as the gap
    in the rest of the progression.
    """
    if len(progression) < 2:
        return True
    if len(progression) == max_size:
        return False
    return progression[1] - progression[0] == element - progression[-1]