maths.mobius_function ===================== .. py:module:: maths.mobius_function .. autoapi-nested-parse:: References: https://en.wikipedia.org/wiki/M%C3%B6bius_function References: wikipedia:square free number psf/black : True ruff : True Functions --------- .. autoapisummary:: maths.mobius_function.mobius Module Contents --------------- .. py: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'