Problem 49738. Determine whether a prime is Pythagorean
Pythagorean primes get their name from the property that they can be written as the sum of two squares. For example,
. Cody Problem 45964 asked you to find the nth Pythagorean prime and two numbers whose squares will produce the prime. This problem merely asks you to determine whether a prime can be written as the sum of two squares.
Write a function to determine whether a prime is Pythagorean. All input numbers in the tests are prime. Because some are large, they are given as strings.
Solution Stats
Problem Comments
Solution Comments
Show commentsProblem Recent Solvers22
Suggested Problems
-
2902 Solvers
-
Convert a numerical matrix into a cell array of strings
1746 Solvers
-
Given a matrix, swap the 2nd & 3rd columns
1039 Solvers
-
491 Solvers
-
Find the sides of an isosceles triangle when given its area and height from its base to apex
1842 Solvers
More from this Author269
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!