Maximum Primes whose sum is equal to given N | Function to find max count of primes ; if n is even n / 2 is required answer if n is odd floor ( n / 2 ) = ( int ) ( n / 2 ) is required answer ; Driver Code
< ? php function maxPrimes ( $ n ) { return ( int ) ( $ n / 2 ) ; } $ n = 17 ; echo maxPrimes ( $ n ) ; ? >