
    In a social networking platform's friend recommendation system, write a function that determines if a user's profile ID number follows the special matching pattern where it is one less than twice its reverse, indicating a potential friend match. For example, a user ID of 36 would match with reverse 63 since 36 is one less than 2*63, and this pattern helps identify compatible connections in the network.
    

    
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 networking platform's friend recommendation system, write a function that determines if a user's profile ID number follows the special matching pattern where it is one less than twice its reverse, indicating a potential friend match. For example, a user ID of 36 would match with reverse 63 since 36 is one less than 2*63, and this pattern helps identify compatible connections in the network.
    

    """
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 networking platform's friend recommendation system, write a function that determines if a user's profile ID number follows the special matching pattern where it is one less than twice its reverse, indicating a potential friend match. For example, a user ID of 36 would match with reverse 63 since 36 is one less than 2*63, and this pattern helps identify compatible connections in the network.
    

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