Function to check if N satisfies the equation 2 * reverse ( n ) = n + 1
bool check ( int n ) { int x = ( n + 7 ) / 8 ; if ( ( n + 7 ) % 8 == 0 && isPower ( 10 , x ) ) return true ; else return false ; }