I happened to see this problem on Twitter. It reminded me of my secondary school when I was passionate about solving math problems :)... I am thinking of a little corner of this blog for this sort of exercising.
Claim: If p is prime, all the coefficients in (a+b)p except the first and the last are divisible by p.
Equivalent claim: If p is prime, p∣Ck_p for all k,0<k<p.
Proof.
Ck_p=k!(p−k)!p!=k!(p−k)!p(p−1)!
Let x=(p−1)!,y=k!(p−k)!. Then Ck_p=ypx
Ck_p∈Z⟹y∣px(∗)
We know that ∀z<p:gcd(p,z)=1. So, ∀z<p:gcd(p,z!)=1.
Because k,p−k<p, we have gcd(p,k!)=gcd(p,(p−k)!)=1
⟹gcd(p,y)=1(∗∗)
From (∗), (∗∗) ⟹y∣x⟹p∣pyx=Ck_p ■