


'''simple docstring'''
from __future__ import annotations

import math


def 			_lowercase       (				UpperCamelCase__       :					int			):

 if 1 < number < 4:
  # 2 and 3 are primes
  return True
 elif number < 2 or number % 2 == 0 or number % 3 == 0:
  # Negatives, 0, 1, all even numbers, all multiples of 3 are not primes
  return False

 # All primes number are in format of 6k +/- 1
 for i in range(5,				int(math.sqrt(UpperCamelCase__			) + 1			),				6			):
  if number % i == 0 or number % (i + 2) == 0:
   return False
 return True


def 			_lowercase       (				UpperCamelCase__       :					int			):
 __A  :		Tuple       =			str(UpperCamelCase__			)
 __A  :		Tuple       =			[n]
 for i in range(1,				len(UpperCamelCase__			)			):
  list_nums.append(int(str_num[i:]			)			)
  list_nums.append(int(str_num[:-i]			)			)
 return list_nums


def 			_lowercase       (				UpperCamelCase__       :					int			):
 if len(str(UpperCamelCase__			)			) > 3:
  if not is_prime(int(str(UpperCamelCase__			)[-3:]			)			) or not is_prime(int(str(UpperCamelCase__			)[:3]			)			):
   return False
 return True


def 			_lowercase       (				UpperCamelCase__       :					int = 11			):
 __A  :		list[int]       =			[]
 __A  :		List[str]       =			13
 while len(UpperCamelCase__			) != count:
  if validate(UpperCamelCase__			):
   __A  :		List[str]       =			list_truncated_nums(UpperCamelCase__			)
   if all(is_prime(UpperCamelCase__			) for i in list_nums			):
    list_truncated_primes.append(UpperCamelCase__			)
  num += 2
 return list_truncated_primes


def 			_lowercase       (				):
 return sum(compute_truncated_primes(11			)			)


if __name__ == "__main__":
 print(f'''{sum(compute_truncated_primes(11)) = }''')










'''simple docstring'''
from __future__ import annotations

class 						_lowerCamelCase					:




 '''simple docstring'''


 def __init__(      self      ,      __lowercase						):

  """simple docstring"""







  __A  :		Dict       =			order

  # a_{0} ... a_{k}
  __A  :		str       =			[1.0] + [0.0] * order
  # b_{0} ... b_{k}
  __A  :		Any       =			[1.0] + [0.0] * order

  # x[n-1] ... x[n-k]
  __A  :		Optional[int]       =			[0.0] * self.order
  # y[n-1] ... y[n-k]
  __A  :		Dict       =			[0.0] * self.order


 def  snake_case__   (      self      ,      __lowercase      ,      __lowercase						):

  """simple docstring"""







  if len(__lowercase						) < self.order:
   __A  :		List[Any]       =			[1.0, *a_coeffs]

  if len(__lowercase						) != self.order + 1:
   __A  :		Tuple       =			(
       F"""Expected a_coeffs to have {self.order + 1} elements """
       F"""for {self.order}-order filter, got {len(__lowercase						)}"""
   )
   raise ValueError(__lowercase						)

  if len(__lowercase						) != self.order + 1:
   __A  :		List[Any]       =			(
       F"""Expected b_coeffs to have {self.order + 1} elements """
       F"""for {self.order}-order filter, got {len(__lowercase						)}"""
   )
   raise ValueError(__lowercase						)

  __A  :		Optional[int]       =			a_coeffs
  __A  :		Optional[int]       =			b_coeffs







 def  snake_case__   (      self      ,      __lowercase						):

  """simple docstring"""







  __A  :		Union[str, Any]       =			0.0

  # Start at index 1 and do index 0 at the end.
  for i in range(1      ,      self.order + 1						):
   result += (
       self.b_coeffs[i] * self.input_history[i - 1]
       - self.a_coeffs[i] * self.output_history[i - 1]
   )

  __A  :		Optional[int]       =			(result + self.b_coeffs[0] * sample) / self.a_coeffs[0]

  __A  :		List[str]       =			self.input_history[:-1]
  __A  :		Optional[int]       =			self.output_history[:-1]

  __A  :		Optional[int]       =			sample
  __A  :		Dict       =			result

  return result






