



'''simple docstring'''






UpperCamelCase__:   Optional[int]								=			[sum(int(c, 10) ** 2 for c in i.__str__()) for i in range(100000)]


def  snake_case_     (					_lowerCAmelCase  :						Optional[int]  )      ->   Optional[int]:
							UpperCAmelCase :       List[Any] 							=		0
							while number:
														# Increased Speed Slightly by checking every 5 digits together.
														sum_of_digits_squared += DIGITS_SQUARED[number % 100000]
														number //= 100000

							return sum_of_digits_squared


# There are 2 Chains made,
# One ends with 89 with the chain member 58 being the one which when declared first,
# there will be the least number of iterations for all the members to be checked.

# The other one ends with 1 and has only one element 1.

# So 58 and 1 are chosen to be declared at the starting.

# Changed dictionary to an array to quicken the solution
UpperCamelCase__:   List[str]								=			[None] * 10000000
UpperCamelCase__:   Union[str, Any]								=			True
UpperCamelCase__:   Any								=			False


def  snake_case_     (					_lowerCAmelCase  :						List[str]  )      ->   Optional[int]:

							if CHAINS[number - 1] is not None:
														return CHAINS[number - 1]  # type: ignore

							UpperCAmelCase :       Tuple 							=		chain(next_number(_lowerCAmelCase  )  )
							UpperCAmelCase :       Dict 							=		number_chain

							while number < 10000000:
														UpperCAmelCase :       Optional[int] 							=		number_chain
														number *= 10

							return number_chain


def  snake_case_     (					_lowerCAmelCase  :						Union[str, Any] = 10000000  )      ->   Tuple:
							for i in range(1   ,      _lowerCAmelCase  ):
														if CHAINS[i] is None:
																					chain(i + 1  )

							return CHAINS[:number].count(_lowerCAmelCase  )


if __name__ == "__main__":
						import doctest

						doctest.testmod()
						print(F"{solution() = }")







def     _a					(						lowerCamelCase							):

 if p < 2:
  raise ValueError("""p should not be less than 2!"""							)
 elif p == 2:
  return True

 lowerCamelCase		:	Any							=      4
 lowerCamelCase		:	List[str]							=      (1 << p) - 1
 for _ in range(p - 2							):
  lowerCamelCase		:	List[Any]							=      ((s * s) - 2) % m
 return s == 0


if __name__ == "__main__":
      print(lucas_lehmer_test(7))
      print(lucas_lehmer_test(1_1))




