



def  UpperCAmelCase__    (    lowercase__   ) ->      list[int]:

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


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










def  UpperCAmelCase__    (    lowercase__						,       lowercase__						,       lowercase__   ) ->      float:
						__lowercase					=				(num_of_terms / 2) * (2 * first_term + (num_of_terms - 1) * common_diff)
						# formula for sum of series
						return total






def  UpperCAmelCase__    (    ) ->      List[str]:
						print(sum_of_series(1						,       1						,       10   )   )


if __name__ == "__main__":
			import doctest

			doctest.testmod()





