Sponsored links: Algebra eBooks

### The Maxima on-line user's manual

Algebra Calculator

#### Moebius

Function: moebius (<n>) Represents the Moebius function.

When <n> is product of k distinct primes, `moebius(<n>)` simplifies to (-1)^k; when <n> = 1, it simplifies to 1; and it simplifies to 0 for all other positive integers.

`moebius` distributes over equations, lists, matrices, and sets.

Examples:

```          (%i1) moebius (1);
(%o1)                           1
(%i2) moebius (2 * 3 * 5);
(%o2)                          - 1
(%i3) moebius (11 * 17 * 29 * 31);
(%o3)                           1
(%i4) moebius (2^32);
(%o4)                           0
(%i5) moebius (n);
(%o5)                      moebius(n)
(%i6) moebius (n = 12);
(%o6)                    moebius(n) = 0
(%i7) moebius ([11, 11 * 13, 11 * 13 * 15]);
(%o7)                      [- 1, 1, 1]
(%i8) moebius (matrix ([11, 12], [13, 14]));
[ - 1  0 ]
(%o8)                      [        ]
[ - 1  1 ]
(%i9) moebius ({21, 22, 23, 24});
(%o9)                      {- 1, 0, 1}```

```(%o1)                                true
(%i2) ```

### Related Examples

moebius (98);

Calculate

moebius (6848);

moebius (504);

Calculate

moebius (10);

moebius (100);

moebius (1000);

Calculate

moebius(1);

Calculate

##### moebius-nusum

nusum(moebius(i),i,1,5);

Calculate

moebius (2^2);

moebius (3^2);

moebius (2^3);

Calculate

moebius (26);

Calculate

##### moebius

moebius (989541);

Calculate

moebius (2220);

Calculate

moebius (18);

Calculate