



import math



def 		lowerCAmelCase__     (       UpperCamelCase_					:							int						)->	int:

    if not isinstance(UpperCamelCase_			,							UpperCamelCase_						):
        A__					=       f"Input value of [number={number}] must be an integer"
        raise TypeError(UpperCamelCase_						)

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

        A__					=       [3, 5]
        A__					=       2
        A__					=       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):
      _lowercase    	=		0
      try:
         _lowercase    	=		proth(number)
      except ValueError:
         print(F"ValueError: there is no {number}th Proth number")
         continue

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





_lowercase    	=		[0, 2, 4, 6, 8]
_lowercase    	=		[1, 3, 5, 7, 9]



def 		lowerCAmelCase__     (       UpperCamelCase_					:							int			,							UpperCamelCase_					:							int			,							UpperCamelCase_					:							list[int]			,							UpperCamelCase_					:							int						)->	int:
    if remaining_length == 0:
        if digits[0] == 0 or digits[-1] == 0:
            return 0

        for i in range(length // 2 - 1			,							-1			,							-1						):
            remainder += digits[i] + digits[length - i - 1]

            if remainder % 2 == 0:
                return 0

            remainder //= 1_0

        return 1

    if remaining_length == 1:
        if remainder % 2 == 0:
            return 0

        A__					=       0
        for digit in range(1_0						):
            A__					=       digit
            result += reversible_numbers(
                0			,							(remainder + 2 * digit) // 1_0			,							UpperCamelCase_			,							UpperCamelCase_						)
        return result

    A__					=       0
    for digita in range(1_0						):
        A__					=       digita

        if (remainder + digita) % 2 == 0:
            A__					=       ODD_DIGITS
        else:
            A__					=       EVEN_DIGITS

        for digita in other_parity_digits:
            A__					=       digita
            result += reversible_numbers(
                remaining_length - 2			,							(remainder + digita + digita) // 1_0			,							UpperCamelCase_			,							UpperCamelCase_			,							)
    return result



def 		lowerCAmelCase__     (       UpperCamelCase_					:							int = 9						)->	int:
    A__					=       0
    for length in range(1			,							max_power + 1						):
        result += reversible_numbers(UpperCamelCase_			,							0			,							[0] * length			,							UpperCamelCase_						)
    return result


if __name__ == "__main__":
   print(F"{solution() = }")
