Problem 45964. Compute the nth Pythagorean prime
Pythagorean primes have the form
, where n is an integer, and they can be written as the sum of squares of two integers. More information is available at Wikipedia, Numberphile, and the Online Encyclopedia of Integer Sequences.
Compute the nth Pythagorean prime p and two integers a and b such that
.
Solution Stats
Problem Comments
-
2 Comments
Nicolas Douillet
on 17 Jun 2025
Hey. I have some troubles submitting my solution to this problem. Since yesterday I keep having the message : "The server is not available. Wait a few minutes, and then retry your request. If the problem persists, contact the instructor." My solution when I tested it in the pad successufully passes through all the tests though. Any idea what the problem could be ?
Asif Newaz
on 30 Jun 2025 at 5:58
@Nicolas Douillet
I think its because your code is taking too long to run. you need to make your code fast so that it can be compiled within the given time and satisfy all the test cases.
Solution Comments
Show commentsProblem Recent Solvers37
Suggested Problems
-
5795 Solvers
-
11180 Solvers
-
1033 Solvers
-
467 Solvers
-
2120 Solvers
More from this Author307
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!