So here's an interesting fact I've learned while researching these things called Wolstenholme Primes. See they're related to the binomial coefficient and thus pascals triangle. We've probably all seen sierpinski's triangle in here (if not circle all the odd numbers). But here's something else interesting. If you look at the triangle, you'll see that for prime numbers, every element is divisible by that prime number. Look at 11 for example.
55, 165, 330, and 462 are all divisible by 11. This has to do with the binomial coefficient definition, in which you'll see that if unless we choose either all the elements, or none of them, the factor of our prime number is guaranteed not to cancel out from the numerator's factorial.
We can then use the fact that the sum of all the elements in the nth row of pascal's triangle adds up to 2^n. Once we remove the 1's on each end of the triangle (hence the minus 2) we know that for prime numbers p that all elements are divisible by p, their sum is as well!
Now, I don't know off the top my head if this is only true for prime numbers. It isn't immediately obvious imo. However, if this is strong enough to be an if and only if, then I think I have independently discovered perhaps the *worst* way to test for primality lmao, scaling exponentially instead of the standard logarithmically.
















