In other words, to compute f(n), find the least perfect square greater than or equal to n, and then f(n) is the sum of the square root of that perfect square and the distance from n to the perfect square. This also holds for g(n), but instead of finding the least perfect square greater than or equal to n, find the least perfect square greater than or equal to n that has the same parity as n.\
If n and the next greater perfect square k2 have the same parity, then f(n)=g(n), and the required condition cannot hold. Hence n and k must have different parities, so f(n)=k2βn+k and g(n)=(k+1)2βn+k+1. If g(n)f(n)β=74β, then
(k+1)2βn+k+1k2βn+kβ=74β
which simplifies to 3n=3k2β5kβ8. Therefore kβ‘2(mod3). Also, because 3k2β5k is always even, it follows that n is even and k must be odd.\
Because k2 must be the least perfect square with k2β₯n, it follows that nβ₯(kβ1)2+1. Substituting for n in terms of k gives
k2β35βkβ38ββ₯k2β2k+2
which is equivalent to kβ₯14. The least kβ₯14 that is odd and satisfies kβ‘2(mod3) is k=17, which gives n=172β35ββ 17β38β=258.