We fill the gaps in Gica’s determination of all the odd positive integers d for which the number of distinct prime divisors of fd(x) = d + x2 is less than or equal to 2 for all positive and odd integers \(x \leqslant\sqrt{d}\) . We also determine all the even positive integers d for which the number of distinct prime divisors of fd(x) is less than or equal to 2 for all positive and even integers \(x \leqslant\sqrt{d}\) . These problems are related to famous Frobenius-Rabinowitsch’s characterization of the imaginary quadratic number fields \(\mathbb{Q}(\sqrt{-d})\) of odd discriminants with class number one in terms of the primality of \({1\over{4}}f_{d}(x)\) for all positive and odd integers \(x \leqslant\sqrt{d}\) . However, the solution to our problem is much more difficult to come up with. We also begin to address the same problems for the case of fd(x) = d − x2, in relation with the class groups of real quadratic number fields \(\mathbb{Q}(\sqrt{d})\) .