"""simple docstring"""




from __future__ import annotations

import math






def   UpperCAmelCase					(	UpperCamelCase__				):






							"""simple docstring"""





							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(lowerCAmelCase_				) + 1				)       ,    6				):
														if number % i == 0 or number % (i + 2) == 0:
																					return False
							return True






def   UpperCAmelCase					(	UpperCamelCase__				):






							"""simple docstring"""





							A__	     =							str(lowerCAmelCase_				)
							A__	     =							[n]
							for i in range(1       ,    len(lowerCAmelCase_				)				):
														list_nums.append(int(str_num[i:]				)				)
														list_nums.append(int(str_num[:-i]				)				)
							return list_nums






def   UpperCAmelCase					(	UpperCamelCase__				):






							"""simple docstring"""





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






def   UpperCAmelCase					(	UpperCamelCase__ = 11				):






							"""simple docstring"""





							A__	     =							[]
							A__	     =							13
							while len(lowerCAmelCase_				) != count:
														if validate(lowerCAmelCase_				):
																					A__	     =							list_truncated_nums(lowerCAmelCase_				)
																					if all(is_prime(lowerCAmelCase_				) for i in list_nums				):
																												list_truncated_primes.append(lowerCAmelCase_				)
														num += 2
							return list_truncated_primes






def   UpperCAmelCase					(	):






							"""simple docstring"""





							return sum(compute_truncated_primes(11				)				)


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






"""simple docstring"""




from math import cos, sin, sqrt, tau

from audio_filters.iir_filter import IIRFilter






def   UpperCAmelCase					(	UpperCamelCase__       ,    UpperCamelCase__       ,    UpperCamelCase__ = 1 / sqrt(2				)				):






							"""simple docstring"""





							A__	     =							tau * frequency / samplerate
							A__	     =							sin(UpperCamelCase__				)
							A__	     =							cos(UpperCamelCase__				)
							A__	     =							_sin / (2 * q_factor)

							A__	     =							(1 - _cos) / 2
							A__	     =							1 - _cos

							A__	     =							1 + alpha
							A__	     =							-2 * _cos
							A__	     =							1 - alpha

							A__	     =							IIRFilter(2				)
							filt.set_coefficients([aa, aa, aa]       ,    [ba, ba, ba]				)
							return filt






def   UpperCAmelCase					(	UpperCamelCase__       ,    UpperCamelCase__       ,    UpperCamelCase__ = 1 / sqrt(2				)				):






							"""simple docstring"""





							A__	     =							tau * frequency / samplerate
							A__	     =							sin(UpperCamelCase__				)
							A__	     =							cos(UpperCamelCase__				)
							A__	     =							_sin / (2 * q_factor)

							A__	     =							(1 + _cos) / 2
							A__	     =							-1 - _cos

							A__	     =							1 + alpha
							A__	     =							-2 * _cos
							A__	     =							1 - alpha

							A__	     =							IIRFilter(2				)
							filt.set_coefficients([aa, aa, aa]       ,    [ba, ba, ba]				)
							return filt






def   UpperCAmelCase					(	UpperCamelCase__       ,    UpperCamelCase__       ,    UpperCamelCase__ = 1 / sqrt(2				)				):






							"""simple docstring"""





							A__	     =							tau * frequency / samplerate
							A__	     =							sin(UpperCamelCase__				)
							A__	     =							cos(UpperCamelCase__				)
							A__	     =							_sin / (2 * q_factor)

							A__	     =							_sin / 2
							A__	     =							0
							A__	     =							-ba

							A__	     =							1 + alpha
							A__	     =							-2 * _cos
							A__	     =							1 - alpha

							A__	     =							IIRFilter(2				)
							filt.set_coefficients([aa, aa, aa]       ,    [ba, ba, ba]				)
							return filt






def   UpperCAmelCase					(	UpperCamelCase__       ,    UpperCamelCase__       ,    UpperCamelCase__ = 1 / sqrt(2				)				):






							"""simple docstring"""





							A__	     =							tau * frequency / samplerate
							A__	     =							sin(UpperCamelCase__				)
							A__	     =							cos(UpperCamelCase__				)
							A__	     =							_sin / (2 * q_factor)

							A__	     =							1 - alpha
							A__	     =							-2 * _cos
							A__	     =							1 + alpha

							A__	     =							IIRFilter(2				)
							filt.set_coefficients([ba, ba, ba]       ,    [ba, ba, ba]				)
							return filt






def   UpperCAmelCase					(	UpperCamelCase__       ,    UpperCamelCase__       ,    UpperCamelCase__       ,    UpperCamelCase__ = 1 / sqrt(2				)       ,    ):






							"""simple docstring"""





							A__	     =							tau * frequency / samplerate
							A__	     =							sin(UpperCamelCase__				)
							A__	     =							cos(UpperCamelCase__				)
							A__	     =							_sin / (2 * q_factor)
							A__	     =							10 ** (gain_db / 40)

							A__	     =							1 + alpha * big_a
							A__	     =							-2 * _cos
							A__	     =							1 - alpha * big_a
							A__	     =							1 + alpha / big_a
							A__	     =							-2 * _cos
							A__	     =							1 - alpha / big_a

							A__	     =							IIRFilter(2				)
							filt.set_coefficients([aa, aa, aa]       ,    [ba, ba, ba]				)
							return filt






def   UpperCAmelCase					(	UpperCamelCase__       ,    UpperCamelCase__       ,    UpperCamelCase__       ,    UpperCamelCase__ = 1 / sqrt(2				)       ,    ):






							"""simple docstring"""





							A__	     =							tau * frequency / samplerate
							A__	     =							sin(UpperCamelCase__				)
							A__	     =							cos(UpperCamelCase__				)
							A__	     =							_sin / (2 * q_factor)
							A__	     =							10 ** (gain_db / 40)
							A__	     =							(big_a + 1) - (big_a - 1) * _cos
							A__	     =							(big_a + 1) + (big_a - 1) * _cos
							A__	     =							(big_a - 1) - (big_a + 1) * _cos
							A__	     =							(big_a - 1) + (big_a + 1) * _cos
							A__	     =							2 * sqrt(UpperCamelCase__				) * alpha

							A__	     =							big_a * (pmc + aaa)
							A__	     =							2 * big_a * mpc
							A__	     =							big_a * (pmc - aaa)
							A__	     =							ppmc + aaa
							A__	     =							-2 * pmpc
							A__	     =							ppmc - aaa

							A__	     =							IIRFilter(2				)
							filt.set_coefficients([aa, aa, aa]       ,    [ba, ba, ba]				)
							return filt






def   UpperCAmelCase					(	UpperCamelCase__       ,    UpperCamelCase__       ,    UpperCamelCase__       ,    UpperCamelCase__ = 1 / sqrt(2				)       ,    ):






							"""simple docstring"""





							A__	     =							tau * frequency / samplerate
							A__	     =							sin(UpperCamelCase__				)
							A__	     =							cos(UpperCamelCase__				)
							A__	     =							_sin / (2 * q_factor)
							A__	     =							10 ** (gain_db / 40)
							A__	     =							(big_a + 1) - (big_a - 1) * _cos
							A__	     =							(big_a + 1) + (big_a - 1) * _cos
							A__	     =							(big_a - 1) - (big_a + 1) * _cos
							A__	     =							(big_a - 1) + (big_a + 1) * _cos
							A__	     =							2 * sqrt(UpperCamelCase__				) * alpha

							A__	     =							big_a * (ppmc + aaa)
							A__	     =							-2 * big_a * pmpc
							A__	     =							big_a * (ppmc - aaa)
							A__	     =							pmc + aaa
							A__	     =							2 * mpc
							A__	     =							pmc - aaa

							A__	     =							IIRFilter(2				)
							filt.set_coefficients([aa, aa, aa]       ,    [ba, ba, ba]				)
							return filt





