I am far from sure I understand what the real question is because it is obvious that you can never answer a question about an infinitie number of pairs of numbers by testing every pair. However, the question seems to be to determine some sort of description of or limits on n(b) where n(b) is the number of possible values of a such that [imath]\sqrt{a} < b < \sqrt{a + 10^8}[/imath], given that a and b are both non-negative integers.
[math]
0 \le \sqrt{a} < b \implies 0 \le a < b^2.\\
b = 0 \implies b^2 = 0 \implies a < 0, \text { which is a contradiction.}\\
\therefore \ n(0) = 0.\\
b \ge 1 \implies b^2 \ge 1 \implies 0 \le a < b^2 \implies n(b) \le b^2 - 1.\\
[/math]
I admit that I have not worked this out, but I believe that working with the other constraint, namely
[math]0 < b^2 < a + 10^8 \implies -10^8 < (b - 10^4)(b + 10^4) < a \ge 0[/math],
may also lead to bounds on n(b). Let us know how far you get that way.