Fermat's Last Theorem (sometimes called Fermat's conjecture, especially in older texts) states that no three positive integers a, b, and c can satisfy the equation a^n + b^n = c^n for any integer value of n greater than two.
By adopting n=2 and given A and B, the function C=fermat(A,B) return the sort row vector C with all solution c (not c^n) for (0<a=<A , 0<b<=B).
Solution Stats
Problem Comments
Solution Comments
Show commentsProblem Recent Solvers109
Suggested Problems
-
Find all elements less than 0 or greater than 10 and replace them with NaN
15817 Solvers
-
Remove any row in which a NaN appears
8794 Solvers
-
middleAsColumn: Return all but first and last element as a column vector
653 Solvers
-
Rotate input square matrix 90 degrees CCW without rot90
698 Solvers
-
The Answer to Life, the Universe, and Everything
588 Solvers
More from this Author11
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!