maths.special_numbers.proth_number

Calculate the nth Proth number Source:

Attributes

value

Functions

proth(→ int)

Module Contents

maths.special_numbers.proth_number.proth(number: int) int
Parameters:

number – nth number to calculate in the sequence

Returns:

the nth number in Proth number

Note: indexing starts at 1 i.e. proth(1) gives the first Proth number of 3 >>> proth(6) 25 >>> proth(0) Traceback (most recent call last):

ValueError: Input value of [number=0] must be > 0 >>> proth(-1) Traceback (most recent call last):

ValueError: Input value of [number=-1] must be > 0 >>> proth(6.0) Traceback (most recent call last):

TypeError: Input value of [number=6.0] must be an integer

maths.special_numbers.proth_number.value = 0