Opened 3 years ago
Closed 3 years ago
#23624 closed defect (fixed)
0 should not be a primitive root
Reported by: | dkrenn | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | sage-8.1 |
Component: | number theory | Keywords: | |
Cc: | Merged in: | ||
Authors: | Daniel Krenn, Will Song | Reviewers: | Daniel Krenn, David Roe |
Report Upstream: | N/A | Work issues: | |
Branch: | a24534f (Commits) | Commit: | a24534f5384896ee13b96136768da8d25c83edfe |
Dependencies: | Stopgaps: |
Description
sage: mod(0, 17).is_primitive_root()
should return False
.
This also fixes the issue with p^j
being a primitive root mod p^k
where p
is an odd prime.
Reported by Will Song at https://groups.google.com/d/msg/sage-devel/v3RQSsbHrKk/q7NHv4qzBgAJ
Change History (8)
comment:1 Changed 3 years ago by
- Branch set to u/dkrenn/primitiv-root-0
comment:2 Changed 3 years ago by
- Commit set to 121fab6ddaeed58685a324c69407c477bd73e060
comment:3 Changed 3 years ago by
comment:4 Changed 3 years ago by
- Commit changed from 121fab6ddaeed58685a324c69407c477bd73e060 to a24534f5384896ee13b96136768da8d25c83edfe
Branch pushed to git repo; I updated commit sha1. New commits:
a24534f | primitive root p^j mod p^k
|
comment:5 Changed 3 years ago by
- Reviewers set to Daniel Krenn
- Status changed from new to needs_review
LGTM (modulo patchbot), however, I think a second reviewer should have a look (I created this patch out of the fix proposed on the sage-devel mailing list)
comment:6 Changed 3 years ago by
- Reviewers changed from Daniel Krenn to Daniel Krenn, David Roe
Fine with me as well, subject to tests succeeding.
comment:7 Changed 3 years ago by
- Status changed from needs_review to positive_review
comment:8 Changed 3 years ago by
- Branch changed from u/dkrenn/primitiv-root-0 to a24534f5384896ee13b96136768da8d25c83edfe
- Resolution set to fixed
- Status changed from positive_review to closed
Note: See
TracTickets for help on using
tickets.
I think
0
is considered a primitive root mod1
.New commits:
0 is not a primitiv root mod n
0 is primitiv root mod 1
add doctests