------
## 最终结论
```python
def get_total_number_of_sequences(n, m):
    dp = [[0] * (m + 1) for _ in range(n + 1)]
    
    for i in range(1, m + 1):
        dp[1][i] = 1
        
    for length in range(2, n + 1):
        for last in range(1, m + 1):
            start = (last + 1) // 2
            end = min(last * 2, m)
            if start <= end:
                dp[length][last] = sum(dp[length - 1][j] for j in range(start, end + 1))
    
    return sum(dp[n][j] for j in range(1, m + 1))

# Test cases
assert get_total_number_of_sequences(10, 4) == 4
assert get_total_number_of_sequences(5, 2) == 6
assert get_total_number_of_sequences(16, 3) == 84
```