4. The functions f and g are defined for all the positive integers n by the following rule: f(n) is the number of perfect squares less than n and g(n) is the number of primes numbers less than n. If f(x) + g(x) = 16, then x is in the range:
A. 30 < x < 36
B. 30 < x < 37
C. 31 < x < 37
D. 31 < x < 38
E. 32 < x < 38
My answer C
Squares less than 36 : 1,4,9,16,25 = 5 primes less than 36 : 2,3,5,7,11,13,17,19,23,29,31. =11 and sum =16.
Hence the max value N has to be less than 37 as N =38 will increase the number of primes by 1 and squares by 1. And the sum will be 18
Minimum values of N has to be 32, as any value less than 32 will decrease the number of primes by 1.and the sum will be 15