Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

How to create a loop with two variables?

I have defined the following functions:

Sage: def I(x): return 1

Sage: def Moebius(x): return sum(moebius(i)I(xi^(-1)) for i in range (1,x+1))

The output is of course Mertens function. How do I turn Moebius(x) into an operator, so that I can define Moebius^2(x) as the Moebius transform of the output?

How to create a loop with two variables?

I have defined the following functions:

Sage:

def I(x): I(x):
    return 1

1

Sage: def Moebius(x): Moebius(x): return sum(moebius(i)I(xi^(-1)) sum(moebius(i) * I(x*i^(-1)) for i in range (1,x+1))

range(1,x+1))

The output is of course Mertens function. How do I turn Moebius(x) Moebius(x) into an operator, so that I can define Moebius^2(x) Moebius^2(x) as the Moebius transform of the output?