1. Basic Arithmetic Formulas
- Sum of first $$$n$$$ natural numbers:
- Sum of squares:
- Sum of cubes:
2. Modular Arithmetic
- Addition:
- Multiplication:
- Modular inverse (when $$$m$$$ is prime):
3. GCD and LCM
4. Combinatorics
5. Bit Manipulation
- Power of 2 check:
- XOR properties:
6. Prefix Sums
7. Geometry
- Distance formula:
- Triangle area:
8. Pigeonhole Principle
If $$$n+1$$$ objects are placed into $$$n$$$ boxes, at least one box contains more than one object.







