






"""simple docstring"""






def 						_UpperCamelCase			(  A			):
			if not isinstance(A    ,       A			):
						raise ValueError("Input series is not valid, valid series - [1, 2/3, 2]"			)
			if len(A			) == 0:
						raise ValueError("Input list must be a non empty list"			)
			if len(A			) == 1 and series[0] != 0:
						return True
			UpperCamelCase_     =[]
			UpperCamelCase_     =len(A			)
			for i in range(0    ,       A			):
						if series[i] == 0:
									raise ValueError("Input series cannot have 0 as an element"			)
						rec_series.append(1 / series[i]			)
			UpperCamelCase_     =rec_series[1] - rec_series[0]
			for index in range(2    ,       A			):
						if rec_series[index] - rec_series[index - 1] != common_diff:
									return False
			return True




def 						_UpperCamelCase			(  A			):
			if not isinstance(A    ,       A			):
						raise ValueError("Input series is not valid, valid series - [2, 4, 6]"			)
			if len(A			) == 0:
						raise ValueError("Input list must be a non empty list"			)
			UpperCamelCase_     =0
			for val in series:
						answer += 1 / val
			return len(A			) / answer


if __name__ == "__main__":
				import doctest

				doctest.testmod()








"""simple docstring"""






from .hash_table import HashTable
from .number_theory.prime_numbers import is_prime, next_prime
class 						__lowerCAmelCase   (			UpperCAmelCase       ):







  '''simple docstring'''


  def __init__(      self:		List[Any]				,			*UpperCamelCase_:		Dict				,			**UpperCamelCase_:		Optional[int]					):
     super().__init__(*UpperCamelCase_				,			**UpperCamelCase_					)
  def 					UpperCamelCase__   (      self:		Any				,			UpperCamelCase_:		Optional[int]				,			UpperCamelCase_:		Optional[int]					):
     UpperCamelCase_     =(
         next_prime(value % self.size_table					)
         if not is_prime(value % self.size_table					)
         else value % self.size_table
     )  # gt = bigger than
     return next_prime_gt - (data % next_prime_gt)
  def 					UpperCamelCase__   (      self:		str				,			UpperCamelCase_:		List[str]				,			UpperCamelCase_:		str				,			UpperCamelCase_:		Tuple					):
     return (increment * self.__hash_function_a(UpperCamelCase_				,			UpperCamelCase_					)) % self.size_table





  def 					UpperCamelCase__   (      self:		str				,			UpperCamelCase_:		int				,			UpperCamelCase_:		str=None					):
     UpperCamelCase_     =1
     UpperCamelCase_     =self.hash_function(UpperCamelCase_					)

     while self.values[new_key] is not None and self.values[new_key] != key:
        UpperCamelCase_     =(
            self.__hash_double_function(UpperCamelCase_				,			UpperCamelCase_				,			UpperCamelCase_					)
            if self.balanced_factor() >= self.lim_charge
            else None
        )
        if new_key is None:
           break
        else:
           i += 1

     return new_key
