it should be q^2, i don't know why it didn't copy in right.
On Nov 8, 10:52 am, Minh Nguyen <nguyenmi...@gmail.com> wrote: > Hi John, > > On Tue, Nov 9, 2010 at 2:27 AM, JJBWebb <johnjackw...@gmail.com> wrote: > > sage: def EEbuild(bound): > > ....: EE = 1 - q -q2 +O(q^upbound) > > What's the definition for q2? Running your code on Sage 4.6, I got this error: > > sage: version() > 'Sage Version 4.6, Release Date: 2010-10-30' > sage: P = 79; m = 2 > sage: upbound= integer_floor(P^m * (P-1) / 10) + 10 > sage: R.<q> = PowerSeriesRing(IntegerModRing(P^m), upbound) > sage: def EEbuild(bound): > ....: EE = 1 - q - q2 + O(q^upbound) > ....: for i in range(2,bound+1): > ....: EE=EE+(-1)^i*(q^((1/2)*i*(3*i+1))+q^((1/2)*i*(3*i-1))) > ....: return EE > ....: > sage: lil = integer_floor(sqrt(upbound*4/3)) + 10 > sage: ee = EEbuild(lil)+O(q^upbound) > --------------------------------------------------------------------------- > NameError Traceback (most recent call last) > > /home/mvngu/<ipython console> in <module>() > > /home/mvngu/<ipython console> in EEbuild(bound) > > NameError: global name 'q2' is not defined > > -- > Regards > Minh Van Nguyen -- To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URL: http://www.sagemath.org