Pythagorean primes get their name from the property that they can be written as the sum of two squares. For example, 13 = 2^2 + 3^2. 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

397 Solutions

86 Solvers

Last Solution submitted on Nov 28, 2026

Last 200 Solutions

Problem Comments

Solution Comments

Show comments
Loading...

Problem Recent Solvers86

Suggested Problems

More from this Author330

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!