
    Write a function to identify potentially fraudulent transactions by checking if a transaction amount follows a specific numerical pattern where it equals one less than twice its reverse digits. For example, a transaction amount of 2137 would be flagged as suspicious because it is one less than twice 7312 (2137 = 2 × 7312 - 1), which could indicate a structured fraud technique used by criminals to encode illicit transactions.
    

    
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 identify potentially fraudulent transactions by checking if a transaction amount follows a specific numerical pattern where it equals one less than twice its reverse digits. For example, a transaction amount of 2137 would be flagged as suspicious because it is one less than twice 7312 (2137 = 2 × 7312 - 1), which could indicate a structured fraud technique used by criminals to encode illicit transactions.
    

    """
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 identify potentially fraudulent transactions by checking if a transaction amount follows a specific numerical pattern where it equals one less than twice its reverse digits. For example, a transaction amount of 2137 would be flagged as suspicious because it is one less than twice 7312 (2137 = 2 × 7312 - 1), which could indicate a structured fraud technique used by criminals to encode illicit transactions.
    

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