def get_linear_formula(start_i, end_i):
    """
    Get Patsy formula string that has the first order terms for the variables
    that range from start_i to end_i (inclusive).
    
    >>> get_linear_formula(4, 9)
    'x4 + x5 + x6 + x7 + x8 + x9'
    """
    return ' + '.join('x' + str(i) for i in range(start_i, end_i + 1))