
    Write a function to validate if a bus occupancy sensor reading follows a specific calibration pattern where the current passenger count equals twice the reversed digit sequence minus one, indicating proper sensor functionality. For example, if the sensor shows 72, it would be valid since 72 = (2 × 27) - 1.
    

    
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 validate if a bus occupancy sensor reading follows a specific calibration pattern where the current passenger count equals twice the reversed digit sequence minus one, indicating proper sensor functionality. For example, if the sensor shows 72, it would be valid since 72 = (2 × 27) - 1.
    

    """
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 validate if a bus occupancy sensor reading follows a specific calibration pattern where the current passenger count equals twice the reversed digit sequence minus one, indicating proper sensor functionality. For example, if the sensor shows 72, it would be valid since 72 = (2 × 27) - 1.
    

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