Find all postive $m$ such $\gcd(m,2n!+1)=1,\forall n\in N^{+}$

71 Views Asked by At

Find all postive integer $m$,such $$\gcd(m,2n!+1)=1,\forall n\in N^{+}$$

when $n=1$ then we have $$\gcd(m,3)=1$$

when $n=2$,then we have $$\gcd(m,5)=1$$ when $n=3$,then we have $$\gcd(m,13)=1$$ when $n=4$, then we have $$\gcd(m,49)=1$$ $$\gcd(m,241)=1$$ $$\gcd(m,1441)=1$$ I guess the $m=2^a?$ is such it,and other form? in other words,if this answer $2^a$ is only form,How to prove?

1

There are 1 best solutions below

0
On BEST ANSWER

As you note in your question, we must have $\gcd(m,3) = 1$.

If $p > 3$ is prime, let $n = p - 3$. We have $$2n! + 1 \equiv -(p-2)! + 1 \equiv (p-1)! + 1 \equiv 0 \pmod{p},$$ where the last step uses Wilson's theorem.

Thus $\gcd(m,p) = 1$ for all odd primes $p$. Hence $m$ must be a power of $2$.

Conversely, since $2n! + 1$ is odd for all $n$, any power of $2$ answers the question.