maths.special_numbers.proth_number ================================== .. py:module:: maths.special_numbers.proth_number .. autoapi-nested-parse:: Calculate the nth Proth number Source: https://handwiki.org/wiki/Proth_number Attributes ---------- .. autoapisummary:: maths.special_numbers.proth_number.value Functions --------- .. autoapisummary:: maths.special_numbers.proth_number.proth Module Contents --------------- .. py:function:: proth(number: int) -> int :param number: nth number to calculate in the sequence :return: 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 .. py:data:: value :value: 0