maths.special_numbers.weird_number ================================== .. py:module:: maths.special_numbers.weird_number .. autoapi-nested-parse:: https://en.wikipedia.org/wiki/Weird_number Fun fact: The set of weird numbers has positive asymptotic density. Functions --------- .. autoapisummary:: maths.special_numbers.weird_number.abundant maths.special_numbers.weird_number.factors maths.special_numbers.weird_number.semi_perfect maths.special_numbers.weird_number.weird Module Contents --------------- .. py:function:: abundant(n: int) -> bool >>> abundant(0) True >>> abundant(1) False >>> abundant(12) True >>> abundant(13) False >>> abundant(20) True # >>> abundant(-12) # True .. py:function:: factors(number: int) -> list[int] >>> factors(12) [1, 2, 3, 4, 6] >>> factors(1) [1] >>> factors(100) [1, 2, 4, 5, 10, 20, 25, 50] # >>> factors(-12) # [1, 2, 3, 4, 6] .. py:function:: semi_perfect(number: int) -> bool >>> semi_perfect(0) True >>> semi_perfect(1) True >>> semi_perfect(12) True >>> semi_perfect(13) False # >>> semi_perfect(-12) # True .. py:function:: weird(number: int) -> bool >>> weird(0) False >>> weird(70) True >>> weird(77) False