Competition counting and number theory: formulas
Pick a formula to see it explained with worked examples and a solver that shows every step.
About this topic
Competition problems often ask you to count cleverly or reason about whole numbers. These pages show the key tricks.
You will find clear examples, tips on mistakes and a step-by-step solver on every page. Begin with Hockey-stick identity.
Formulas in this topic
- Hockey-stick identityThe hockey-stick identity says Σ_i=rⁿbinom ir=binomn+1r+1. Adding a diagonal of Pascal's triangl
- Sum of k·C(n, k)The sum Σ_k=0ⁿkbinom nk equals n2ⁿ⁻¹.
- Sum of squares of binomial coefficientsThe sum of the squares of the entries in row n of Pascal's triangle is a central binomial coefficient: Σ_k
- Roots-of-unity filterThe roots-of-unity filter picks out every third binomial coefficient: Σ_kbinomn3k=dfrac2ⁿ+2cos
- Circular arrangements and necklacesThe number of ways to seat n distinct people around a circular table (rotations count as the same) is (n-1)!.
- Distributing identical objects (≥ 1 each)The number of solutions of x_1+x_2+…+x_k=n in positive integers is binomn-1k-1. With non-negative in
- Expected value of a uniform die roll and of max of two diceFor a fair n-sided die the expected value is (n+1)/(2), and the expected value of the larger of two indep
Competition counting and number theory questions
What is the hockey-stick identity?
It is a rule about adding numbers along a diagonal of Pascal's triangle.
Does the solver show every step?
Yes. Each page shows the working line by line, then checks the answer so you can see if yours matches.