Find the prime number closest to the given integer .
[THOUGHT]
I will write a Python script to find the prime number closest to .
I will check integers for primality using the sympy.isprime function.
The first prime found will be the closest. If two are found at the same distance, I will note that, but typically one is closer or the question implies a unique answer.
[/THOUGHT] [PYTHON] from sympy import isprime
N = 12269117 found = False d = 0
while not found: # Check lower first, then higher, or check both and see which is closer (they are at distance d) # If d=0, check N if d == 0: if isprime(N): print(f"Found prime: {N} at distance {d}") found = True else: # Check N-d p_down = N - d if isprime(p_down): print(f"Found prime: {p_down} at distance {d}") found = True
# Check N+d
p_up = N + d
if isprime(p_up):
print(f"Found prime: {p_up} at distance {d}")
found = True
if found:
break
d += 1
[/PYTHON]
The prime number closest to is \boxed{12269137}.