#10343 closed defect (invalid)
primitive_root(ZZ) ArithmeticError for (+-)2^i for i >= 3
Reported by: | donmorrison | Owned by: | was |
---|---|---|---|
Priority: | major | Milestone: | sage-duplicate/invalid/wontfix |
Component: | number theory | Keywords: | primitive root PARI |
Cc: | Merged in: | ||
Authors: | Reviewers: | ||
Report Upstream: | Not yet reported upstream; Will do shortly. | Work issues: | |
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description
Gauss' Table of Primitive Roots and Indices gives primitive root g=5 as an example primitive root, for p^i == 16 == 2^4
Looks like a PARI bug:
sage: primitive_root(16)
ArithmeticError Traceback (most recent call last)
/home/donmorrison/sage46fromsrc/sage/<ipython console> in <module>()
/home/donmorrison/sage46fromsrc/sage/local/lib/python2.6/site-packages/sage/rings/arith.pyc in primitive_root(n)
3359 return ZZ(pari(ZZ(n)).znprimroot())
3360 except RuntimeError:
-> 3361 raise ArithmeticError, "There is no primitive root modulo n"
3362
3363 def nth_prime(n):
ArithmeticError: There is no primitive root modulo n
sage:
Change History (2)
comment:1 Changed 11 years ago by
- Resolution set to invalid
- Status changed from new to closed
comment:2 Changed 11 years ago by
- Milestone changed from sage-4.6.1 to sage-duplicate/invalid/wontfix