can sumbody help in solving the problem below:

Write a Java application (call your class IntegerPairSearch)
to do the following.
● It should get a file name and a positive integer N from the command line.
● It should then determine all pairs of positive integers, (a, b), such that
a < b < N and (a2+b2+1)/(ab) is an integer.
● It should print all such pairs to the file; if N is 1000, then the file must contain:
(1, 2)
(2, 5)
(5, 13)
(13, 34)
(34, 89)
(89, 233)
(233, 610)
● Modify your program to use long integers. Call your new program
LongIntegerSearch.
● If N is 5, how many pairs do you have to test? What if N is 12? In general, for N, how
many pairs do you have to test?
● What are the largest pairs you can discover with both applications? In the example
above (233, 610) is the largest.
Deliverables
● The Java source files: IntegerSearch.java and LongIntegerSearch.java

4
Contributors
3
Replies
4
Views
10 Years
Discussion Span
Last Post by stultuske

Ok, so what have you done so far? Or where exactly are you having problems? We can only point you in the right direction - we can't do it for you.

What I don't understand is that when he says:

(a2+b2+1)/(ab)

Does he mean: (a*2+b*2+1)/(a*b)?

can sumbody help in solving the problem below: