Problem 44788. Find the right number make the equation
Given positive integer number n, find the right positive integer number a, b , so that
(1) sqrt(a + n * b) is a positive integer number
(2) sqrt(hypot(a,b)) is a positive integer number
Note: the output must be char array!
Have fun!
Solution Stats
Problem Comments
-
9 Comments
I was using the method to parameterize Pythagorean triples (a,b,c) in terms of s and t. Since we're looking at c^4 instead of c^2 (to make sure that c itself is a perfect square), I can see why the numbers got quite large. My solution for n=2 was for larger numbers than my n=3 solution, although even my n=1 solution had the magnitude of a as 10^16 and b was 10^21. I didn't find anything on the order of 10^13.
@James, I think the following link will help you.
https://www.mathpages.com/home/kmath022/kmath022.htm
Very nice link, Binbin. That is was exactly what I was trying to do, only they didn't include the math error I made in my calculations. :)
Solution Comments
Show commentsProblem Recent Solvers10
Suggested Problems
-
1558 Solvers
-
552 Solvers
-
675 Solvers
-
Integer Sequence - II : New Fibonacci
567 Solvers
-
Sums of cubes and squares of sums
267 Solvers
More from this Author17
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!