
    In a hospital emergency room that can process up to m patients per hour, determine the number of possible patient flow patterns over n consecutive hours, where each hour must handle at least double the patients of the previous hour to maintain efficient resource allocation. Each hourly patient count must not exceed the maximum processing capacity m.
    

    
def get_total_number_of_sequences(m, n):
    """
    In a hospital emergency room that can process up to m patients per hour, determine the number of possible patient flow patterns over n consecutive hours, where each hour must handle at least double the patients of the previous hour to maintain efficient resource allocation. Each hourly patient count must not exceed the maximum processing capacity m.
    

    """
def get_total_number_of_sequences(m, n):
    """
    In a hospital emergency room that can process up to m patients per hour, determine the number of possible patient flow patterns over n consecutive hours, where each hour must handle at least double the patients of the previous hour to maintain efficient resource allocation. Each hourly patient count must not exceed the maximum processing capacity m.
    

    """
    T = [[0 for i in range(n + 1)] for i in range(m + 1)]
    for i in range(m + 1):
        for j in range(n + 1):
            if i == 0 or j == 0:
                T[i][j] = 0
            elif i < j:
                T[i][j] = 0
            elif j == 1:
                T[i][j] = i
            else:
                T[i][j] = T[i - 1][j] + T[i // 2][j - 1]
    return T[m][n]