Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Mertens Function Error

I am new to Sage, so I suppose the answer to this is ridiculously obvious, but please go easy on me!

I have an error when I try to get Mertens function as an output yet: I know the summation works for other functions; and I know the Moebius function is defined on the range. So what's going on?

This is the input and output:

var('m'); var('j'); f=moebius(j) sum(f,j,0,m)


TypeError Traceback (most recent call last) <ipython-input-1-29d7fd7804be> in <module>() 1 var('m'); 2 var('j'); ----> 3 f=moebius(j) 4 sum(f,j,Integer(0),m)

/home/sc_serv/sage/local/lib/python2.7/site-packages/sage/rings/arith.pyc in __call__(self, n) 3831 n = -n 3832 F = factor(n) -> 3833 for _, e in F: 3834 if e >= 2: 3835 return 0

TypeError: 'sage.symbolic.expression.Expression' object is not iterable

Mertens Function Error

I am new to Sage, so I suppose the answer to this is ridiculously obvious, but please go easy on me!

I have an error when I try to get Mertens function as an output yet: I know the summation works for other functions; and I know the Moebius function is defined on the range. So what's going on?

This is the input and output:

var('m'); var('j');

sage: var('m')
sage: var('j')
sage: f=moebius(j)
sage: sum(f,j,0,m) 


TypeError Traceback (most recent call last) <ipython-input-1-29d7fd7804be> in <module>() 1 var('m'); 2 var('j'); .... ----> 3 f=moebius(j) 4 sum(f,j,Integer(0),m)

/home/sc_serv/sage/local/lib/python2.7/site-packages/sage/rings/arith.pyc in __call__(self, n) 3831 n = -n 3832 F = factor(n) -> 3833 for _, e in F: 3834 if e >= 2: 3835 return 0

sum(f,j,Integer(0),m) ... TypeError: 'sage.symbolic.expression.Expression' object is not iterable

iterable

Mertens Function Error

I am new to Sage, so I suppose the answer to this is ridiculously obvious, but please go easy on me!

I have an error when I try to get Mertens function as an output yet: I know the summation works for other functions; and I know the Moebius function is defined on the range. So what's going on?

This is the input and output:

sage: var('m')
sage: var('j')
sage: f=moebius(j)
sage: sum(f,j,0,m) f = moebius(j) 
TypeError                                 Traceback (most recent call last)
....
----> 3 f=moebius(j)
      4 sum(f,j,Integer(0),m)
...
TypeError: 'sage.symbolic.expression.Expression' object is not iterable

Mertens Function Error

I am new to Sage, so I suppose the answer to this is ridiculously obvious, but please go easy on me!

I have an error when I try to get Mertens function as an output yet: I know the summation works for other functions; and I know the Moebius function is defined on the range. So what's going on?

This is the input and output:

sage: var('j')
sage: f = moebius(j) 
TypeError                                 Traceback (most recent call last)
....
----> 3 f=moebius(j)
      4 sum(f,j,Integer(0),m)
...
TypeError: 'sage.symbolic.expression.Expression' object is not iterable

Mertens Function Error

I am new to Sage, so I suppose the answer to this is ridiculously obvious, but please go easy on me!

I have an error when I try to get Mertens function as an output yet: I know the summation works for other functions; and I know the Moebius function is defined on the range. So what's going on?

This is the input and output:

sage: var('j')
sage: f = moebius(j) 
TypeError                                 Traceback (most recent call last)
....
----> f=moebius(j)
...
TypeError: 'sage.symbolic.expression.Expression' object is not iterable
click to hide/show revision 6
retagged

Mertens Function Error

I am new to Sage, so I suppose the answer to this is ridiculously obvious, but please go easy on me!

I have an error when I try to get Mertens function as an output yet: I know the summation works for other functions; and I know the Moebius function is defined on the range. So what's going on?

This is the input and output:

sage: var('j')
sage: f = moebius(j) 
TypeError                                 Traceback (most recent call last)
....
----> f=moebius(j)
...
TypeError: 'sage.symbolic.expression.Expression' object is not iterable