# Revision history [back]

### 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?

 2 No.2 Revision tmonteil 20663 ●25 ●146 ●382 http://wiki.sagemath.o...

### How to create a loop with two variables?

I have defined the following functions:

Sage:

def I(x): I(x):
return 11
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?