Problem 44319. Write c^3 as sum of two squares a^2+b^2
write c^3 as sum of two squares a^2+b^2. a and b must be integer and greater than zero.
For example
5^3 = 2^2 + 11^2 5^3 = 5^2 + 10^2 10^3 = 10^2 + 30^2 10^3 = 18^2 + 26^2
sort output matrix so that each row and first column is in ascending order.
Solution Stats
Problem Comments
-
4 Comments
First case is also wrong: 1^3 = 1^2 + 0^2. The problem doesn't specify positive numbers, so it is a valid solution. (If you *really* want to open a can of worms, a and b don't have to be integers, or even real numbers according to the test suite!)
You are right James. I have add some sentences to problem definition.
How on earth the leading solution size is 7? can you please provide it also for us ?
Solution Comments
Show commentsProblem Recent Solvers319
Suggested Problems
-
Determine Whether an array is empty
783 Solvers
-
Change the sign of even index entries of the reversed vector
574 Solvers
-
Convert given decimal number to binary number.
2112 Solvers
-
Van Eck's Sequence's nth member
321 Solvers
-
1581 Solvers
More from this Author92
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!