#10343: primitive_root(ZZ) ArithmeticError for (+-)2^i for i >= 3
-----------------------------+----------------------------------------------
   Reporter:  donmorrison    |       Owner:  was                                
        
       Type:  defect         |      Status:  new                                
        
   Priority:  major          |   Milestone:  sage-4.6.1                         
        
  Component:  number theory  |    Keywords:  primitive root PARI                
        
     Author:                 |    Upstream:  Not yet reported upstream; Will do 
shortly.
   Reviewer:                 |      Merged:                                     
        
Work_issues:                 |  
-----------------------------+----------------------------------------------
 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:

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/10343>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en.

Reply via email to