
    Write a function to determine if the current traffic flow rate at an intersection matches a specific pattern where the flow rate is one less than double its reverse reading - a pattern that indicates optimal timing for signal changes. For example, a flow rate of 21 vehicles per minute would satisfy this pattern since it is one less than twice its reverse (12).
    

    
def rev(num):
    rev_num = 0
    while num > 0:
        rev_num = rev_num * 10 + num % 10
        num = num // 10
    return rev_num

def check(n):
    """
    Write a function to determine if the current traffic flow rate at an intersection matches a specific pattern where the flow rate is one less than double its reverse reading - a pattern that indicates optimal timing for signal changes. For example, a flow rate of 21 vehicles per minute would satisfy this pattern since it is one less than twice its reverse (12).
    

    """
def rev(num):
    rev_num = 0
    while num > 0:
        rev_num = rev_num * 10 + num % 10
        num = num // 10
    return rev_num

def check(n):
    """
    Write a function to determine if the current traffic flow rate at an intersection matches a specific pattern where the flow rate is one less than double its reverse reading - a pattern that indicates optimal timing for signal changes. For example, a flow rate of 21 vehicles per minute would satisfy this pattern since it is one less than twice its reverse (12).
    

    """
    return 2 * rev(n) == n + 1