



"""simple docstring"""






def     _lowercase       (						__snake_case			)		->     bool:

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

			__lowerCAmelCase   :						List[Any]				= 4
			__lowerCAmelCase   :						Any				= (1 << p) - 1
			for _ in range(p - 2			):
						__lowerCAmelCase   :						Any				= ((s * s) - 2) % m
			return s == 0


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




"""simple docstring"""






def     _lowercase       (						__snake_case      ,__snake_case			)		->     list:
			__lowerCAmelCase   :						List[str]				= len(__snake_case			)
			__lowerCAmelCase   :						Dict				= []
			for i in range(len(__snake_case			) - pat_len + 1			):
						__lowerCAmelCase   :						List[Any]				= True
						for j in range(__snake_case			):
									if s[i + j] != pattern[j]:
												__lowerCAmelCase   :						Union[str, Any]				= False
												break
						if match_found:
									position.append(__snake_case			)
			return position


if __name__ == "__main__":
	assert naive_pattern_search('ABCDEFG', 'DE') == [3]
	print(naive_pattern_search('ABAAABCDBBABCDDEBCABC', 'ABC'))