-
-
Notifications
You must be signed in to change notification settings - Fork 660
Open
Description
Is there any reason not to implement the following?
sage: prime_range(11, 100, 10)
[11, 31, 61, 71]
For this ticket, I have in mind the easy fix of running the same internal algorithm and retaining only the answers in the desired congruence class; that is, prime_range(x, y, z)
would be equivalent to
[p for p in prime_range(x, y) if (p-x)%z == 0]
A more advanced (and more efficient) version would be to change the underlying algorithm.
Depends on #31548
CC: @DaveWitteMorris
Component: number theory
Author: David Roe
Branch/Commit: u/roed/prime_range @ 7f0a385
Issue created by migration from https://trac.sagemath.org/ticket/29760