Easy Sequences 51: Positive Gaussian Primes - MATLAB Cody - MATLAB Central

Problem 53094. Easy Sequences 51: Positive Gaussian Primes

Difficulty:Rate
A Gaussian Prime is a gaussian integer that cannot be decomposed as product of two non-unit gaussian integers (the complex units being: 1, , i and ). We say that a gaussian prime , is positive, if and .
Write a function that counts the number of elements of set, ,of all positive gaussian primes , such that p and q are both .
For example, for , the complete set of positive gaussian primes are as follows:
Therefore, for the function should return .

Solution Stats

71.43% Correct | 28.57% Incorrect
Last Solution submitted on Aug 21, 2023

Problem Comments

Solution Comments

Show comments
PIVlab surpasses 100K all-time File Exchange downloads
During the past twelve months, PIVlab, a MATLAB Community Toolbox for particle...
4
8
LLMs with MATLAB updated to support the latest OpenAI Models
Large Languge model with MATLAB, a free add-on that lets you access...
2
4

Problem Recent Solvers4

Suggested Problems

More from this Author116

Community Treasure Hunt

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

Start Hunting!