


"""simple docstring"""





def   _snake_case    (    _snake_case					:      int			, _snake_case					:      int			, _snake_case					:      int      ):
      if common_ratio == 1:
            # Formula for sum if common ratio is 1
            return num_of_terms * first_term

      # Formula for finding sum of n terms of a GeometricProgression
      return (first_term / (1 - common_ratio)) * (1 - common_ratio**num_of_terms)






"""simple docstring"""





def   _snake_case    (    _snake_case					:      int      ):
      if not isinstance(_snake_case			, _snake_case      ):
            lowerCAmelCase       :						int							= f'''Input value of [number={number}] must be an integer'''
            raise TypeError(_snake_case      )
      if number < 0 or number % 2 == 1:
            return False
      lowerCAmelCase       :						int							= int(number**0.5      )
      return number == number_sqrt * (number_sqrt + 1)


if __name__ == "__main__":
 import doctest

 doctest.testmod()


