5

While playing with Pascal's triangle, I observed that $\binom{4}{k } \mod 2 =0$ for $k=1,2,3$,and $\binom{8}{k } \mod 2 =0$ for $k=1,2,3,4,5,6,7$ This made me curious about the values of $n>1$ and $m>1$ that satisfy $\binom{n}{k } \mod m =0$ for all $k=1,2,3,\dots,n-1$ I asked my friend to write a $C++$ code that could test this condition for $n$ up to $10000$ and $m$ up to $31$ and I found out that $\binom{n}{k } \mod m =0$ for all $k=1,2,3,\dots,n-1$ only when $m $ is a prime number and $n$ is a power of $m$.

#include <bits/stdc++.h>
using namespace std;`
typedef long long ll;
#define rep(i , st , ed) for(int i = st; i < ed; i++)
#define f first
#define s second
const int N = 10000;
const int mod = 31;
ll nCr[N][N] , frq[N];
void gen(){
nCr[0][0] = 1;
for (int i = 0; i < N; ++i) {
    nCr[i][0] = nCr[i][i] = 1;
    for (int j = 1; j < i; ++j) {
        nCr[i][j] = (nCr[i-1][j] + nCr[i-1][j-1]) % mod;
        if(nCr[i][j] == 0) frq[i]++;
    }
}
}
ll get(int n , int r){ return (n >= r) ? nCr[n][r] : 0;  }
int main(){
ios::sync_with_stdio(0); cin.tie(NULL); cout.tie(0);

gen(); for(int i = 1; i < N; ++i) if(frq[i] == i - 1){ cout << i << '\n'; } }

After many attempts to prove or disprove this conjecture, I couldn’t find a solution.


This statement is the same as $$\gcd\left( \binom{n}{1 }, \binom{n}{2 },\dots , \binom{n}{n-1 } \right)= \begin{cases} p, & \text{if $n$ is a power of a prime $p$} \\[2ex] 1, & \text{else. } \end{cases}$$

pie
  • 4,192

1 Answers1

5

It's true.

For primes $p$, Kummer's theorem says the largest $d$ such that ${n \choose k}$ is divisible by $p^d$ is the number of carries when adding $k$ and $n-k$ in base $p$. If $n$ is not a power of $p$, its base $p$ expansion is not of the form $10\ldots 0$. If so, we can take $k$ to be an appropriate power of $p$ and get no carries. Conversely, if $n$ is a power of $p$, the base-$p$ addition of $k$ and $n-k$ must have at least one carry. If $n = p^d$, there is only one carry when adding $p^{d-1} + (p^d - p^{d-1})$. So in the case where $m$ is a power of a prime, $m$ must actually be that prime and $n$ is a power of $m$.

If $m$ is not a power of a prime, and ${n \choose k}$ is divisible by $m$, then it is divisible by all primes dividing $m$. But $n$ can't be a power of more than one prime $p$.

Robert Israel
  • 448,999