from typing import List
import math


def get_minimum_subintervals_set_math(intvl_upper_limit: int, range_length: int = 1) -> List[int]:
    """
    Method that returns the minimal set of placements that cover the full interval. This method uses
    the mathematical expresion that minimizes the number of points, however it can go out of the range,
    so the last point is set to the upper bound when this situation happens.

    :param intvl_upper_limit: upper bound of the interval
    :param range_length: range of the sub-interval from the placement points
    :return: list with the position
    """
    if intvl_upper_limit == 0:
        raise ValueError('The upper limit of the interval has to be bigger than 0')
    number_of_subintervals = math.ceil(intvl_upper_limit / (2 * range_length))
    positions = []
    for i in range(number_of_subintervals):
        if i == 0:
            positions.append(range_length)
        else:
            position = range_length + 2 ** i * range_length
            positions.append(position if position <= intvl_upper_limit else intvl_upper_limit)
    return positions