maths.liouville_lambda ====================== .. py:module:: maths.liouville_lambda .. autoapi-nested-parse:: == Liouville Lambda Function == The Liouville Lambda function, denoted by λ(n) and λ(n) is 1 if n is the product of an even number of prime numbers, and -1 if it is the product of an odd number of primes. https://en.wikipedia.org/wiki/Liouville_function Functions --------- .. autoapisummary:: maths.liouville_lambda.liouville_lambda Module Contents --------------- .. py:function:: liouville_lambda(number: int) -> int This functions takes an integer number as input. returns 1 if n has even number of prime factors and -1 otherwise. >>> liouville_lambda(10) 1 >>> liouville_lambda(11) -1 >>> liouville_lambda(0) Traceback (most recent call last): ... ValueError: Input must be a positive integer >>> liouville_lambda(-1) Traceback (most recent call last): ... ValueError: Input must be a positive integer >>> liouville_lambda(11.0) Traceback (most recent call last): ... TypeError: Input value of [number=11.0] must be an integer