How to efficiently calculate all the integer solutions to $xy > c^2$ where

$0 < x < X$ and $0 < y < Y$ and $X$, $Y$, and $C$ are some positive integers.

I am looking for an algorithmic solution.

I tried brute forcing it by the following way :

  1. Looping from 1 to c
  2. Calculating when x and y both are greater than c
  3. Calculating when x = c and solutions for y and then vice versa
  4. This is the part which slows down the whole process. Calculating the possible solutions when one of them is less than c.

I am majorly interested in the number of points that are valid solutions.

I think if I rotate this rectangular hyperbola by $45o$, it would crack the problem, but this went nowhere.


closed as off-topic by Alexey Ustinov, user44191, abx, Steven Landsburg, Robert Israel Sep 12 at 4:57

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "MathOverflow is for mathematicians to ask each other questions about their research. See Math.StackExchange to ask general questions in mathematics." – Alexey Ustinov, user44191, abx, Robert Israel
If this question can be reworded to fit the rules in the help center, please edit the question.