Is there a simple formula for the following? $$f(n) = \binom{2n}{n} \pmod{n^3}$$

I know $f(n) = 2$ iff $n$ is prime and greater than $3$, but I don't know anything about composite numbers.

  • 1
    $\begingroup$ $f(n)=2$ iff $n$ is prime? Not true for $n=2$ or $3$. $\endgroup$ Commented Jan 11, 2019 at 19:54
  • 1
    $\begingroup$ Might help to look for papers that generalize Lucas's theorem. $\endgroup$
    – DanielV
    Commented Jan 11, 2019 at 21:40
  • 1
    $\begingroup$ I first observed this by using Lucas's theorem (though I didn't know it by name) if we take the squares of row n of binomial triangle and sum them this gives $\binom{2n}{n}$ Then by Lucas theorem if we take away 2 it must be divisible by $n^2$ For reasons I dont know this can be increased to $n^3$ for primes greater than 3. $\endgroup$ Commented Jan 11, 2019 at 23:06
  • 6
    $\begingroup$ For $p$ prime, $p>3$, ${2p \choose p} \equiv 2 \bmod p^3$ is just a reformulation of Wolstenholme Theorem. $\endgroup$
    – René Gy
    Commented Jan 12, 2019 at 13:56
  • 3
    $\begingroup$ We have $(f(n))_{n=1}^\infty=(0,6,20,6,2,60,2,70,506,184,2,1564,\dots)$ and this sequence is not in the Online encyclopedia of integer sequences. $\endgroup$ Commented Mar 4 at 5:48

1 Answer 1


Just a comment.

Numbers appear to be in this form:

\begin{aligned} &{2 n \choose n} \mod n^3 \equiv {2 k \choose k} + \frac{t n^3}{k^3} \\\\ & \text{for }kp \quad p \in \mathbb{P} \text{ prime}, 1\geq t > k^3, k \in \mathbb{N}, k > 1 \end{aligned}

For $k=1, {2p \choose p} \equiv 2 \bmod p^3$

which, as stated in the comments, is a reformulation of Wolstenholme Theorem.


You must log in to answer this question.

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