Skip to content

Add Sieve of Atkin algorithm for efficient prime generation#12974

Open
AyhamJo7 wants to merge 4 commits intoTheAlgorithms:masterfrom
AyhamJo7:add-sieve-of-atkin
Open

Add Sieve of Atkin algorithm for efficient prime generation#12974
AyhamJo7 wants to merge 4 commits intoTheAlgorithms:masterfrom
AyhamJo7:add-sieve-of-atkin

Conversation

@AyhamJo7
Copy link
Copy Markdown

@AyhamJo7 AyhamJo7 commented Sep 17, 2025

This PR adds an implementation of the Sieve of Atkin algorithm to the maths directory.

@algorithms-keeper algorithms-keeper Bot added tests are failing Do not merge until tests pass and removed tests are failing Do not merge until tests pass labels Sep 17, 2025
Implement the Sieve of Atkin algorithm as an alternative to the existing
Sieve of Eratosthenes. This modern algorithm offers better theoretical
complexity O(n / log log n) and uses quadratic forms for prime detection.

Features:
- Comprehensive docstring with algorithm explanation
- Type hints and input validation
- Extensive doctests covering edge cases
- Follows repository coding conventions
@algorithms-keeper algorithms-keeper Bot added the awaiting reviews This PR is ready to be reviewed label Sep 17, 2025
@algorithms-keeper algorithms-keeper Bot added tests are failing Do not merge until tests pass and removed tests are failing Do not merge until tests pass labels Sep 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting reviews This PR is ready to be reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant