



'''simple docstring'''






import math
def 				lowerCamelCase__	(						_A    ):

  if not isinstance(_A			,      _A    ):
    a						: Union[str, Any]					       =					f"""Input value of [number={number}] must be an integer"""
    raise TypeError(_A    )

  if number < 1:
    a						: Dict					       =					f"""Input value of [number={number}] must be > 0"""
    raise ValueError(_A    )
  elif number == 1:
    return 3
  elif number == 2:
    return 5
  else:
    a						: Tuple					       =					int(math.log(number // 3			,      2    )    ) + 2

    a						: Union[str, Any]					       =					[3, 5]
    a						: Union[str, Any]					       =					2
    a						: int					       =					3
    for block in range(1			,      _A    ):
      for _ in range(_A    ):
        proth_list.append(2 ** (block + 1) + proth_list[proth_index - 1]    )
        proth_index += 1
      increment *= 2

  return proth_list[number - 1]


if __name__ == "__main__":
     import doctest

     doctest.testmod()

     for number in range(1_1):
          lowerCAmelCase: str							=						0
          try:
               lowerCAmelCase: Union[str, Any]							=						proth(number)
          except ValueError:
               print(F"ValueError: there is no {number}th Proth number")
               continue

          print(F"The {number}th Proth number: {value}")




'''simple docstring'''






from math import factorial, pi
def 				lowerCamelCase__	(						_A			,      _A = 30    ):

  if not isinstance(_A			,      (int, float)    ):
    raise ValueError('maclaurin_sin() requires either an int or float for theta'    )

  if not isinstance(_A			,      _A    ) or accuracy <= 0:
    raise ValueError('maclaurin_sin() requires a positive int for accuracy'    )

  a						: Dict					       =					float(_A    )
  a						: List[Any]					       =					theta // (2 * pi)
  theta -= 2 * div * pi
  return sum(
      (-1) ** r * theta ** (2 * r + 1) / factorial(2 * r + 1    ) for r in range(_A    )    )
def 				lowerCamelCase__	(						_A			,      _A = 30    ):

  if not isinstance(_A			,      (int, float)    ):
    raise ValueError('maclaurin_cos() requires either an int or float for theta'    )

  if not isinstance(_A			,      _A    ) or accuracy <= 0:
    raise ValueError('maclaurin_cos() requires a positive int for accuracy'    )

  a						: int					       =					float(_A    )
  a						: str					       =					theta // (2 * pi)
  theta -= 2 * div * pi
  return sum((-1) ** r * theta ** (2 * r) / factorial(2 * r    ) for r in range(_A    )    )


if __name__ == "__main__":
     import doctest

     doctest.testmod()

     print(maclaurin_sin(1_0))
     print(maclaurin_sin(-1_0))
     print(maclaurin_sin(1_0, 1_5))
     print(maclaurin_sin(-1_0, 1_5))

     print(maclaurin_cos(5))
     print(maclaurin_cos(-5))
     print(maclaurin_cos(1_0, 1_5))
     print(maclaurin_cos(-1_0, 1_5))