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(β†’Β int)

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’