'''simple docstring'''

import math







def __UpperCamelCase(   _A					:				int    ):
   '''simple docstring'''
   UpperCAmelCase__							:				str   				=  0
   UpperCAmelCase__							:				List[Any]   				=  0
   while num > 0:
      UpperCAmelCase__							:				Union[str, Any]   				=  num % 8
      UpperCAmelCase__							:				int   				=  octal + (remainder * math.floor(math.pow(10  ,			_A    )    ))
      counter += 1
      UpperCAmelCase__							:				str   				=  math.floor(num / 8    )  # basically /= 8 without remainder if any
      # This formatting removes trailing '.0' from `octal`.
   return F'''0o{int(_A    )}'''







def __UpperCamelCase(   ):
   '''simple docstring'''
   print('''\n2 in octal is:'''    )
   print(decimal_to_octal(2    )    )  # = 2
   print('''\n8 in octal is:'''    )
   print(decimal_to_octal(8    )    )  # = 10
   print('''\n65 in octal is:'''    )
   print(decimal_to_octal(65    )    )  # = 101
   print('''\n216 in octal is:'''    )
   print(decimal_to_octal(2_16    )    )  # = 330
   print('''\n512 in octal is:'''    )
   print(decimal_to_octal(5_12    )    )  # = 1000
   print('''\n'''    )


if __name__ == "__main__":
  main()





'''simple docstring'''

def __UpperCamelCase(   _A					:				int    ):
   '''simple docstring'''

   if length <= 0 or not isinstance(_A  ,			_A    ):
      raise ValueError('''Length must be a positive integer.'''    )
   return [n * (2 * n - 1) for n in range(_A    )]


if __name__ == "__main__":
  print(hexagonal_numbers(length=5))
  print(hexagonal_numbers(length=10))




