#10506: efficient counting of cusps for the principal congruence subgroup 
Gamma(n)
-----------------------------+----------------------------------------------
   Reporter:  rje            |       Owner:  John Cremona                       
                     
       Type:  enhancement    |      Status:  new                                
                     
   Priority:  minor          |   Milestone:  sage-4.6.1                         
                     
  Component:  modular forms  |    Keywords:  cusps, ncusps(), Gamma(n), 
principal congruence subgroup
     Author:  Ron Evans      |    Upstream:  N/A                                
                     
   Reviewer:                 |      Merged:                                     
                     
Work_issues:                 |  
-----------------------------+----------------------------------------------
 In the sage-support group, John Cremona suggested writing a ticket aimed
 at replacing the current code for G.ncusps, where G is the principal
 congruence subgroup Gamma(n), with more efficient code.  Please make a
 patch using the following replacement code.  This new code will compute
 say Gamma(15).ncusps() in less than a second, instead of the hours it
 takes with the current code.

 n=self.level()

 if n<=2:

         return[None,1,3][n]

 return ZZ((1/2)*sum([moebius(d)*(n/d)*(n/d)   for d in n.divisors()]))

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/10506>
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