Bunuel wrote:

4. The functions f and g are defined for all the positive integers n by the following rule: f(n) is the number of positive 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

Perfect squares: 1, 4, 9, 16, 25, 36, ..,

Prime numbers: 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, ...

If x = 31, then f(31) = 5 and g(31) = 10: f(x) + g(x) = 5 + 10 = 15.

If x = 32, then f(32) = 5 and g(32) = 11: f(x) + g(x) = 5 + 11 = 16.

...

If x = 36, then f(36) = 5 and g(36) = 11: f(x) + g(x) = 5 + 11 = 16.

If x = 37, then f(37) = 6 and g(37) = 11: f(x) + g(x) = 6 + 11 = 17.

Thus x could be 32, 33, 34, 35 or 36: 31<x<37.

Answer: C.

It is given

"f(n) is the number of positive perfect squares less than n" then X should be greater than 36, with this answer comes to D. ??? please correct if I am wrong & please correct.