





"""simple docstring"""
import math

def 		_SCREAMING_SNAKE_CASE			(_UpperCAmelCase					:    int			):

 if not isinstance(_UpperCAmelCase  ,     _UpperCAmelCase			):
  lowerCAmelCase    				= F'Input value of [number={number}] must be an integer'
  raise TypeError(_UpperCAmelCase			)

 if number < 1:
  lowerCAmelCase    				= F'Input value of [number={number}] must be > 0'
  raise ValueError(_UpperCAmelCase			)
 elif number == 1:
  return 3
 elif number == 2:
  return 5
 else:
  lowerCAmelCase    				= int(math.log(number // 3  ,     2			)			) + 2

  lowerCAmelCase    				= [3, 5]
  lowerCAmelCase    				= 2
  lowerCAmelCase    				= 3
  for block in range(1  ,     _UpperCAmelCase			):
   for _ in range(_UpperCAmelCase			):
    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(11):
              __UpperCamelCase     :						Optional[int]						       =  0
              try:
                     __UpperCamelCase     :						List[str]						       =  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 typing import Optional

import pyspark

from .. import Features, NamedSplit
from ..download import DownloadMode
from ..packaged_modules.spark.spark import Spark
from .abc import AbstractDatasetReader





class      lowerCAmelCase (			__lowerCAmelCase):


       def __init__( self     ,	__SCREAMING_SNAKE_CASE     ,	__SCREAMING_SNAKE_CASE = None     ,	__SCREAMING_SNAKE_CASE = None     ,	__SCREAMING_SNAKE_CASE = True     ,	__SCREAMING_SNAKE_CASE = None     ,	__SCREAMING_SNAKE_CASE = False     ,	__SCREAMING_SNAKE_CASE = None     ,	__SCREAMING_SNAKE_CASE = True     ,	__SCREAMING_SNAKE_CASE = "arrow"     ,	**__SCREAMING_SNAKE_CASE     ,	)   ->	Union[str, Any]:



            '''simple docstring'''




            super().__init__(
                split=__SCREAMING_SNAKE_CASE     ,	features=__SCREAMING_SNAKE_CASE     ,	cache_dir=__SCREAMING_SNAKE_CASE     ,	keep_in_memory=__SCREAMING_SNAKE_CASE     ,	streaming=__SCREAMING_SNAKE_CASE     ,	**__SCREAMING_SNAKE_CASE     ,	)
            __snake_case            =	load_from_cache_file
            __snake_case            =	file_format
            __snake_case            =	Spark(
                df=__SCREAMING_SNAKE_CASE     ,	features=__SCREAMING_SNAKE_CASE     ,	cache_dir=__SCREAMING_SNAKE_CASE     ,	working_dir=__SCREAMING_SNAKE_CASE     ,	**__SCREAMING_SNAKE_CASE     ,	)




       def    lowerCAmelCase   ( self	)   ->	str:



            '''simple docstring'''




            if self.streaming:
                 return self.builder.as_streaming_dataset(split=self.split	)
            __snake_case            =	None if self._load_from_cache_file else DownloadMode.FORCE_REDOWNLOAD
            self.builder.download_and_prepare(
                download_mode=__SCREAMING_SNAKE_CASE     ,	file_format=self._file_format     ,	)
            return self.builder.as_dataset(split=self.split	)






