
"""simple docstring"""


from __future__ import annotations



def     _lowerCamelCase(__UpperCamelCase       )				-> bool:
	_lowerCAmelCase								=42
	_lowerCAmelCase								=list(__UpperCamelCase       )
	_lowerCAmelCase						,							_lowerCAmelCase								=_vector[:-1], int(_vector[-1]       )
	_lowerCAmelCase								=[int(__UpperCamelCase       ) for digit in __vector]

	vector.reverse()
	for i, digit in enumerate(__UpperCamelCase       ):
		if i & 1 == 0:
			_lowerCAmelCase								=digit * 2
			if doubled > 9:
				doubled -= 9
			check_digit += doubled
		else:
			check_digit += digit

	return check_digit % 10 == 0


if __name__ == "__main__":
			import doctest

			doctest.testmod()
			assert is_luhn('79927398713')
			assert not is_luhn('79927398714')





"""simple docstring"""


def     _lowerCamelCase(__UpperCamelCase       )				-> list:
	_lowerCAmelCase								=[True for i in range(n + 1       )]
	_lowerCAmelCase								=[i - 1 for i in range(n + 1       )]
	_lowerCAmelCase								=[]
	for i in range(2    , n + 1       ):
		if is_prime[i]:
			primes.append(__UpperCamelCase       )
		for j in range(0    , len(__UpperCamelCase       )       ):
			if i * primes[j] >= n:
				break
			_lowerCAmelCase								=False

			if i % primes[j] == 0:
				_lowerCAmelCase								=totients[i] * primes[j]
				break

			_lowerCAmelCase								=totients[i] * (primes[j] - 1)

	return totients


if __name__ == "__main__":
			import doctest

			doctest.testmod()



