def exponential_growth(level, constant=1):
    """
    The number of samples in an exponentially growing 1D quadrature rule of 
    a given level.

    Parameters
    ----------
    level : integer
       The level of the quadrature rule

    Return
    ------
    num_samples_1d : integer
        The number of samples in the quadrature rule
    """
    if level == 0:
        return 1
    return constant*2**(level+1)-1