Find all natural $n$ numbers such that $15(n!)^2+1$ is divisible by $2n-3$. My try: First I assumed $2n-3$ is not prime number. Let $a$ be divisor of $2n-3$. It's clear that $a<n-1$, so $15(n!)^2$ is divisible by $a$. Which means $15(n!)^2+1$ is not divisble by $a$. But it is given that $15(n!)^2+1$is divisble by $n$ which means it is divisible by $a$ too. But we have already proved it is not. Contradiction! So $2n-3$ must be prime number. Now if we change $2n-3$ as $p$. We can say $15*((p+3)/2)!*((p+3)/2)!$ is congruent to $-1$ by p module. By Wilson's theorem $15*((p+3)/2)!*((p+3)/2)!$ is congruent to $(p-1)!$ by p module. From here I don't know how to continue.

  • 1
    $\begingroup$ I really like this problem, but your title needs to be more descriptive. $\endgroup$
    – player3236
    Nov 8, 2020 at 8:51

1 Answer 1


You do need Wilson's Theorem, but observe:

\begin{align}n &\equiv -(n-3) \pmod {2n-3}\\ n-1 &\equiv -(n-2) \pmod {2n-3}\\ &\ \vdots\\ 1 &\equiv -(2n-4)\pmod {2n-3}\end{align}

This gives:

\begin{align}(n!)^2&\equiv n!(-1)^n(2n-4)(2n-5)\dots(n-2)(n-3) \pmod {2n-3}\\&\equiv(-1)^n(2n-4)!(n)(n-1)(n-2)(n-3) \pmod {2n-3}\\\text{(Wilson)} &\equiv(-1)^{n+1}(n)(n-1)(n-2)(n-3)\pmod {2n-3}\\ &\equiv(-1)^{n+1}n^2(n-1)^2 \pmod {2n-3}\end{align}

Now we seperate into cases where $n$ is odd or even. For $n$ odd satisfying the division condition,

$$15(n!)^2+1\equiv 15n^2(n-1)^2+1 \equiv 0 \pmod {2n-3}$$

$z = \dfrac {15n^2(n-1)^2+1}{2n-3}$ is an integer iff $16z$ is. Simplifying we have

$$16z=120 n^3 - 60 n^2 + 30 n + 45 + \frac {151} {2 n - 3}$$

So the above is an integer only if $2n-3$ divides $151$, which is a prime, giving $2n-3 = 151$, $n = 77$.

The case for $n$ even should be similar. Technically, you also need to consider the cases $2n-3 = \pm 1$ separately, since $\pm1$ are neither prime nor composite.

  • $\begingroup$ From your result of $(n!)^2\equiv (-1)^{n+1}n^2(n-1)^2\pmod {2n-3}$, we can then get that $15(n!)^2+1\equiv 15(-1)^{n+1}n^2(n-1)^2+1\equiv 0\pmod{2n-3}$. From this, we have $15(-1)^{n+1}(2n)^2(2n-2)^2+16\equiv 15(-1)^{n+1}(3)^2(1)^2+16\equiv (-1)^{n+1}135+16\equiv 0\pmod{2n-3}$. With $n$ odd, this gives $151\equiv 0\pmod{2n-3}$. Since $151$ is prime, we have $2n-3=151\;\to\;n=77$, as you've already determined. With $n$ even, we get $-119\equiv 0\pmod{2n-3}$. Since $119=7(17)$, this means $2n-3=7\;\to\;n=5$ or $2n-3=17\;\to\;n=10$. However, $5$ is odd, so only $n=10$ is a solution. $\endgroup$ Aug 29, 2023 at 21:19

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .