Problem 52866. Easy Sequences 36: Hyperbolic Lattice Points
The graph, shown below, of the hyperbola:  , passes through four positive lattice points:
, 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.)
 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.
, passes through.
NOTE: The trivial point  , is not to be included in the count.
, is not to be included in the count.
Solution Stats
Problem Comments
- 
		1 Comment
		GeeTwo
    	on 10 Nov 2022
	
	
  	The graph labeling is incorrect.  The horizontal line is y=2, the vertical is x=4.
Positive lattice points are not defined.  From context this appears to be (n,m) where m and n are both positive integers (natural numbers).  Note that in the sample case (2,-2) is on the hyberbola but presumably not counted because m==2, or y=2.
Solution Comments
Show commentsProblem Recent Solvers7
Suggested Problems
- 
         Maximum running product for a string of numbers 2215 Solvers 
- 
         Find state names that end with the letter A 1189 Solvers 
- 
         
         10203 Solvers 
- 
         
         171 Solvers 
- 
         
         85 Solvers 
More from this Author116
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!