
    Write a function to determine if a customer's account pattern number is eligible for special loan terms by checking if it is one less than twice its reverse pattern value. For example, if a customer's account pattern is 2431, verify if this number is one less than twice the value of 1342.
    

    
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 a customer's account pattern number is eligible for special loan terms by checking if it is one less than twice its reverse pattern value. For example, if a customer's account pattern is 2431, verify if this number is one less than twice the value of 1342.
    

    """
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 a customer's account pattern number is eligible for special loan terms by checking if it is one less than twice its reverse pattern value. For example, if a customer's account pattern is 2431, verify if this number is one less than twice the value of 1342.
    

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