maths.mobius_functionΒΆ
References: https://en.wikipedia.org/wiki/M%C3%B6bius_function References: wikipedia:square free number psf/black : True ruff : True
FunctionsΒΆ
|
Mobius function |
Module ContentsΒΆ
- maths.mobius_function.mobius(n: int) intΒΆ
Mobius function >>> mobius(24) 0 >>> mobius(-1) 1 >>> mobius(βasdβ) Traceback (most recent call last):
β¦
TypeError: β<=β not supported between instances of βintβ and βstrβ >>> mobius(10**400) 0 >>> mobius(10**-400) 1 >>> mobius(-1424) 1 >>> mobius([1, β2β, 2.0]) Traceback (most recent call last):
β¦
TypeError: β<=β not supported between instances of βintβ and βlistβ