# Is there a simple formula for $\binom{2n}{n} \pmod{n^3}$?

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.

• $f(n)=2$ iff $n$ is prime? Not true for $n=2$ or $3$. Commented Jan 11, 2019 at 19:54
• Might help to look for papers that generalize Lucas's theorem. Commented Jan 11, 2019 at 21:40
• 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. Commented Jan 11, 2019 at 23:06
• For $p$ prime, $p>3$, ${2p \choose p} \equiv 2 \bmod p^3$ is just a reformulation of Wolstenholme Theorem. Commented Jan 12, 2019 at 13:56
• 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. Commented Mar 4 at 5:48

\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$$