12

Here is what I observed :

Let $n$ be a natural number greater than 2.

Let $A = 2\cdot\binom{3n+1}{n}-\binom{3n}{n-1}+\binom{3n-1}{n-2}$

Let $p=2n+1$

$p$ is prime iff $A \equiv 2 \pmod{p}$

You can run this test here.

I tried with some prime and composite numbers below 350000 and I didn't find any counterexample.

Is there a way to prove it ? I think this is related to Wilson's theorem but I'm not sure.

  • 2
    The criterion is correct for all integers in the range $[2,3\cdot 10^4]$. I hoped that Wolfram Alpha could simplify the expression, but this is not the case. – Peter Mar 11 '22 at 12:47
  • 3
    Seems that in the case that $p$ is prime, all the binomial coefficients are congruent $1$ mod $p$ – Peter Mar 11 '22 at 13:14
  • Nice observation ! – kijinSeija Mar 11 '22 at 13:16
  • 1
    I wrapped your GP code in Sage to make it interactive. There's probably a better way, but I don't know GP syntax. https://sagecell.sagemath.org/?z=eJxNzsEKwjAMBuB7n6IUhGRrhXbgYaPgm8icrRRsG2bxIr67URF2Cv9HyJ9jKi2s89LEJUR5AvKHAUdJKztcaR8e8w2iUkqQf9JrEsW7jnorUgQ4p1Jz4oXhQ1oSds5sUZOx2G_FWDaHuIPvGfTe6V-Z4pGDwn9caqZ6T40JJ8EfIL4B1TQzKQ==&lang=sage – PM 2Ring Mar 11 '22 at 13:46
  • Thanks ! I don't know Sage at all – kijinSeija Mar 11 '22 at 13:55
  • 5
    The prime case can actually be proven since the factors in the numerators of the binomials are congruent the corresponding factors in the denominators modulo $p$ and none of them are divisible by $p$. But for the composite case, I have no idea yet. – Peter Mar 11 '22 at 14:53
  • 3
    You can slightly simplify the expression by Pascal's rule, in fact you can show $A \equiv \binom{3n-1}{p}+\binom{3n}{p} \pmod {p}$. Not saying it's gonna help :) – Sil Mar 12 '22 at 11:02
  • @Sil yes I noticed that too indeed – kijinSeija Mar 13 '22 at 19:00
  • 1
    @kijinSeija removed my previous comment as it was failing the same counterexamples $p=1093^2$ and $p=3511^2$ you have found, good find! – Sil Mar 15 '22 at 21:13

1 Answers1

5

Peter’s keen observation and idea is a Credit to the following partial answer.

I agree with what Peter said that the prime case is not difficult to prove using an interesting lemma below.

Lemma:

For any prime number $p$ and natural number $k$ satisfying $p<k<2p,$ $$ \left(\begin{array}{c} k \\ p \end{array}\right) \equiv 1 \quad (\bmod p) $$

Proof:

By definition, $$ \left(\begin{array}{l} k \\ p \end{array}\right)=\frac{k(k-1)\cdots(p+2)(p+1)}{(k-p)!} $$

Rearranging gives $$ (k-p)!\left(\begin{array}{l} k \\ p \end{array}\right)=k(k-1) \cdots(p+2)(p+1) $$

As $p\not |k,$ taking both sides in modulo $p,$ yields $$ \begin{aligned} (k-p) !\left(\begin{array}{c} k \\ p \end{array}\right) & \equiv (k-p) !\quad (\bmod p) \\ \left(\begin{array}{l} k \\ p \end{array}\right) & \equiv 1 \quad (\bmod p) \end{aligned} $$

Rewriting $A$ gives $$ \begin{aligned} A &=2\left(\begin{array}{c} 3 n+1 \\ 2 n+1 \end{array}\right)-\left(\begin{array}{c} 3 n \\ 2 n+1 \end{array}\right)+\left(\begin{array}{c} 3 n-1 \\ 2 n+1 \end{array}\right) \\ &=2\left(\begin{array}{c} 3 n+1 \\ p \end{array}\right)-\left(\begin{array}{c} 3 n \\ p \end{array}\right)+\left(\begin{array}{c} 3 n-1 \\ p \end{array}\right) \end{aligned} $$

If $p=2n+1$ is prime, then using the lemma yields $$ A \equiv 2-1+1 \equiv 2 \quad \pmod p $$

Wish someone can help solve the converse!

Lai
  • 31,615