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’