Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

prime_range should allow a step #29760

Open
kedlaya opened this issue May 30, 2020 · 14 comments
Open

prime_range should allow a step #29760

kedlaya opened this issue May 30, 2020 · 14 comments

Comments

@kedlaya
Copy link
Contributor

kedlaya commented May 30, 2020

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

@kedlaya kedlaya added this to the sage-9.2 milestone May 30, 2020
@kedlaya

This comment has been minimized.

@kedlaya
Copy link
Contributor Author

kedlaya commented Sep 19, 2020

comment:1

Upon further reflection, maybe I should also be asking for this in the primes iterator.

@kedlaya kedlaya modified the milestones: sage-9.2, sage-9.3 Sep 19, 2020
@mkoeppe
Copy link
Contributor

mkoeppe commented Feb 13, 2021

comment:2

Setting new milestone based on a cursory review of ticket status, priority, and last modification date.

@mkoeppe mkoeppe modified the milestones: sage-9.3, sage-9.4 Feb 13, 2021
@roed314
Copy link
Contributor

roed314 commented Apr 26, 2021

Branch: u/roed/prime_range

@roed314
Copy link
Contributor

roed314 commented Apr 26, 2021

comment:4

Dependence on #31548 is in order to have FLINT's ulong_extras.


Last 10 new commits:

1a7bb38Fixing some bugs
6f41da9Fixing doctest problems from switching default implementation to flint for small matrices
cd1b853Merge branch 'u/roed/nmod_mat' of trac.sagemath.org:sage into t/31548/nmod_mat
d0507c4Working on fixing reduction matrix bug
9748ffcAdd deprecation warning to _reduction_matrix
6e2b75aMerge branch 'u/roed/nmod_mat' of trac.sagemath.org:sage into t/31548/nmod_mat
ee10b06Working on documentation and fixing tests
465f51dWorking on documentation
760e0c9Small fixes
726b135Add step to prime_range and primes

@roed314
Copy link
Contributor

roed314 commented Apr 26, 2021

Author: David Roe

@roed314
Copy link
Contributor

roed314 commented Apr 26, 2021

Commit: 726b135

@roed314
Copy link
Contributor

roed314 commented Apr 26, 2021

Dependencies: #31548

@roed314
Copy link
Contributor

roed314 commented Apr 26, 2021

comment:5

The changes in this ticket are all in sage/rings/fast_arith.p* and sage/arith/misc.py.

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Apr 26, 2021

Changed commit from 726b135 to 7f0a385

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Apr 26, 2021

Branch pushed to git repo; I updated commit sha1. New commits:

7f0a385Fix fast_arith.pxd

@kedlaya
Copy link
Contributor Author

kedlaya commented May 12, 2021

comment:7

Looks fine modulo the dependence on #31548.

@mkoeppe
Copy link
Contributor

mkoeppe commented Jul 19, 2021

comment:8

Setting a new milestone for this ticket based on a cursory review.

@mkoeppe mkoeppe modified the milestones: sage-9.4, sage-9.5 Jul 19, 2021
@mezzarobba
Copy link
Member

comment:9

needs rebase, dependency too

@mkoeppe mkoeppe modified the milestones: sage-9.5, sage-9.6 Dec 18, 2021
@mkoeppe mkoeppe removed this from the sage-9.6 milestone Apr 2, 2022
@mkoeppe mkoeppe added this to the sage-9.7 milestone Apr 2, 2022
@mkoeppe mkoeppe modified the milestones: sage-9.7, sage-9.8 Sep 19, 2022
@mkoeppe mkoeppe removed this from the sage-9.8 milestone Jan 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants