

'''simple docstring'''


from __future__ import annotations




def 	_a       (				__lowerCAmelCase		:      list[int | float]   ,							__lowerCAmelCase		:      int   ,							__lowerCAmelCase		:      int     ):

		"""simple docstring"""

		if len(UpperCamelCase__     ) == 0:
				raise ValueError('''find_max() arg is an empty sequence'''     )
		if (
		    left >= len(UpperCamelCase__     )
		    or left < -len(UpperCamelCase__     )
		    or right >= len(UpperCamelCase__     )
		    or right < -len(UpperCamelCase__     )
		):
				raise IndexError('''list index out of range'''     )
		if left == right:
				return nums[left]
		snake_case__						:       str       						=  (left + right) >> 1  # the middle
		snake_case__						:       Union[str, Any]       						=  find_max(UpperCamelCase__   ,							UpperCamelCase__   ,							UpperCamelCase__     )  # find max in range[left, mid]
		snake_case__						:       Union[str, Any]       						=  find_max(UpperCamelCase__   ,							mid + 1   ,							UpperCamelCase__     )  # find max in range[mid + 1, right]

		return left_max if left_max >= right_max else right_max


if __name__ == "__main__":
					import doctest

					doctest.testmod(verbose=True)






'''simple docstring'''


def 	_a       (				__lowerCAmelCase		:      int     ):

		"""simple docstring"""

		if p < 2:
				raise ValueError('''p should not be less than 2!'''     )
		elif p == 2:
				return True

		snake_case__						:       Any       						=  4
		snake_case__						:       int       						=  (1 << p) - 1
		for _ in range(p - 2     ):
				snake_case__						:       Tuple       						=  ((s * s) - 2) % m
		return s == 0


if __name__ == "__main__":
					print(lucas_lehmer_test(7))
					print(lucas_lehmer_test(11))



