maths.special_numbers.abundant_numbers

A number n is said to be an Abundant number if the sum of its proper divisors is greater than the number itself.

Examples of Abundant Numbers: 12, 18, 20, 24, 30, 36, 40, 42, 48, 54, …

https://en.wikipedia.org/wiki/Abundant_number

Functions

is_abundant_number(→ bool)

This function takes an integer number as input.

Module Contents

maths.special_numbers.abundant_numbers.is_abundant_number(number: int) bool

This function takes an integer number as input. Returns True if the number is abundant.

>>> is_abundant_number(-1)
False
>>> is_abundant_number(0)
False
>>> is_abundant_number(12)
True
>>> is_abundant_number(18)
True
>>> is_abundant_number(28)
False
>>> is_abundant_number(20)
True
>>> is_abundant_number(6)
False
>>> is_abundant_number(1)
False
>>> is_abundant_number(945)
True
>>> is_abundant_number(28.0)
Traceback (most recent call last):
    ...
TypeError: Input value of [number=28.0] must be an integer