Problem 52866. Easy Sequences 36: Hyperbolic Lattice Points

The graph, shown below, of the hyperbola: , passes through four positive lattice points:.
It can be shown that those 4 points are the only positive lattice points that the above hyperbola touches. (A lattice point is a point on the xy-plane where both n and m are integers.)
Given the integers a and b, write a function that counts the number of positive lattice points that the hyperbola: , passes through.
NOTE: The trivial point , is not to be included in the count.

Solution Stats

70.0% Correct | 30.0% Incorrect
Last Solution submitted on Jan 09, 2023

Problem Comments

Solution Comments

Show comments

Problem Recent Solvers7

Suggested Problems

More from this Author116

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!