Check if a prime number can be expressed as sum of two Prime Numbers | Function to check whether a number is prime or not ; Function to check if a prime number can be expressed as sum of two Prime Numbers ; if the number is prime , and number - 2 is also prime ; Driver code
< ? php function isPrime ( $ n ) { if ( $ n <= 1 ) return false ; for ( $ i = 2 ; $ i <= sqrt ( $ n ) ; $ i ++ ) { if ( $ n % $ i == 0 ) return false ; } return true ; } function isPossible ( $ N ) { if ( isPrime ( $ N ) && isPrime ( $ N - 2 ) ) return true ; else return false ; } $ n = 13 ; if ( isPossible ( $ n ) ) echo ( " Yes " ) ; else echo ( " No " ) ; ? >