
    In a social network's friend recommendation system, determine if a user's ID number follows a special matching pattern where it is exactly one less than double its reverse ID, as this pattern has been found to indicate high compatibility between users. For example, if user 241 exists in the system, check if this ID is one less than twice its reverse (142 * 2), which would trigger a potential friend recommendation between these users.
    

    
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):
    """
    In a social network's friend recommendation system, determine if a user's ID number follows a special matching pattern where it is exactly one less than double its reverse ID, as this pattern has been found to indicate high compatibility between users. For example, if user 241 exists in the system, check if this ID is one less than twice its reverse (142 * 2), which would trigger a potential friend recommendation between these users.
    

    """
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):
    """
    In a social network's friend recommendation system, determine if a user's ID number follows a special matching pattern where it is exactly one less than double its reverse ID, as this pattern has been found to indicate high compatibility between users. For example, if user 241 exists in the system, check if this ID is one less than twice its reverse (142 * 2), which would trigger a potential friend recommendation between these users.
    

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