






'''simple docstring'''







def  SCREAMING_SNAKE_CASE_       (UpperCamelCase      )      ->       int:
							assert isinstance(UpperCamelCase				,			UpperCamelCase      ), f'''The input value of [n={number}] is not an integer'''

							if number == 1:
														return 2
							elif number < 1:
														lowerCamelCase__					:	Optional[Any]         =       f'''The input value of [n={number}] has to be > 0'''
														raise ValueError(UpperCamelCase      )
							else:
														lowerCamelCase__					:	Optional[Any]         =       sylvester(number - 1      )
														lowerCamelCase__					:	Union[str, Any]         =       num - 1
														lowerCamelCase__					:	List[str]         =       num
														return lower * upper + 1


if __name__ == "__main__":
			print(F'The 8th number in Sylvester\'s sequence: {sylvester(8)}')









'''simple docstring'''







class _lowercase	:




							def __init__(							self:				Tuple			,							UpperCamelCase__:				list[int]     ):
														lowerCamelCase__					:	Union[str, Any]         =       len(UpperCamelCase__     )
														lowerCamelCase__					:	Union[str, Any]         =       [0] * len_array

														if len_array > 0:
																					lowerCamelCase__					:	Union[str, Any]         =       array[0]

														for i in range(1			,							UpperCamelCase__     ):
																					lowerCamelCase__					:	Tuple         =       self.prefix_sum[i - 1] + array[i]




							def 		lowerCamelCase_				(							self:				Tuple			,							UpperCamelCase__:				int			,							UpperCamelCase__:				int     ):
														if start == 0:
																					return self.prefix_sum[end]

														return self.prefix_sum[end] - self.prefix_sum[start - 1]




							def 		lowerCamelCase_				(							self:				Optional[int]			,							UpperCamelCase__:				int     ):
														lowerCamelCase__					:	Dict         =       {0}
														for sum_item in self.prefix_sum:
																					if sum_item - target_sum in sums:
																												return True

																					sums.add(UpperCamelCase__     )

														return False


if __name__ == "__main__":
			import doctest

			doctest.testmod()

