maths.special_numbers.hamming_numbers ===================================== .. py:module:: maths.special_numbers.hamming_numbers .. autoapi-nested-parse:: A Hamming number is a positive integer of the form 2^i*3^j*5^k, for some non-negative integers i, j, and k. They are often referred to as regular numbers. More info at: https://en.wikipedia.org/wiki/Regular_number. Attributes ---------- .. autoapisummary:: maths.special_numbers.hamming_numbers.n Functions --------- .. autoapisummary:: maths.special_numbers.hamming_numbers.hamming Module Contents --------------- .. py:function:: hamming(n_element: int) -> list This function creates an ordered list of n length as requested, and afterwards returns the last value of the list. It must be given a positive integer. :param n_element: The number of elements on the list :return: The nth element of the list >>> hamming(-5) Traceback (most recent call last): ... ValueError: n_element should be a positive number >>> hamming(5) [1, 2, 3, 4, 5] >>> hamming(10) [1, 2, 3, 4, 5, 6, 8, 9, 10, 12] >>> hamming(15) [1, 2, 3, 4, 5, 6, 8, 9, 10, 12, 15, 16, 18, 20, 24] .. py:data:: n