"If all the binomial coefficients (except the 1's) of $n$ are divisible by $n$, then $n$ is a prime no ".

39 Views Asked by At

This is like a basic find in the Pascal's triangle. So we know this amazing fact that can distinguish prime numbers from other numbers, so why isn't there any solid formula for like, the sum of all prime numbers lessthan 10 or the number of primes below 10 by using nCr or such?

2

There are 2 best solutions below

0
On

Try seeing if $\frac{\binom{91}{7}}{91}$ is an integer without first realizing whether $\frac{91}7$ is an integer, and I think you'll be able to answer your own question.

0
On

You could write something like

$$f(n)={\sum\limits_{k=2}^{n-1} \left({n \choose k} - k\left\lfloor {n \choose k} /k\right\rfloor\right)}$$

where $\lfloor x \rfloor$ is $x$ rounded down to an integer, with $f(2)$ being the empty sum and so $0$. You will have $f(n)=0$ for primes and $f(n)>0$ for composite numbers

If you have $0^n=0$ for $n \gt 0$ and $0^0=1$ then $$\sum_{n=2}^m 0^{f(n)}$$ is the number of primes less than or equal to $n$. Unfortunately, it is a more comlicated calculation than simpler ways of finding prime numbers