# Useful lower-level formulas?

I'm looking for useful lower-level mathematical formulas that are useful for a variety of problems and help in high-school math competitions.

Some formulas that I've found very useful so far are

• Vieta's formulas (Quadratics: $r_1+r_2=\frac{-b}a$, $r_1r_2=\frac ca$) (Cubics: $r_1+r_2+r_3=\frac{-b}a, r_1r_2+r_2r_3+r_3r_1=\frac ca, r_1r_2r_3=\frac{-d}a$
• Euclidian Algorithim $\gcd(2322, 654)=\gcd(654,360), \;\gcd(654,360)=\gcd(360,294)...$
• Shoelace Theorem $P=\frac 12((a_1b_2,\;a_2b_3\;...\;a_nb_1)-(b_1a_2,\;b_2a_3\;...\;b_na_1))$ where $(a_1b_1),\;(a_2b_2)\;...\;(a_nb_n)$ are the points of a polygon listed in a clockwise order and $P$ is the area of the polygon
• Heron's Formula $A=\sqrt{s(s-a)(s-b)(s-c)}$ where $A$ is a triangle with side lengths $a,\;b,$ and $c$, and $s$ is the semi-perimeter, or $\dfrac{a+b+c}2$
• Ptolemy's Theorem $ab+cd=ef$, when $a,\;b,\;c,$ and $d$ are the side lengths of a cyclic quadrilateral and $e$ and $f$ are its diagonals.
• Fermat's Little Theorem $a^{p-1}\equiv 1 \pmod p$ where $a$ is an integer, $p$ is a prime number, and $a$ is not divisible by $p$
• Formula for a median of a triangle: In $\Delta ABC$, the length of the median to side $BC$ is $\frac 12 \sqrt{2AB^2+2AC^2-BC^2}$
• Distance from a point to a line: $ax + by + c = 0, \left(x_0, y_0\right) \implies D_{\text{min}} = \dfrac{\left|ax_0 + by_0 + c\right|}{\sqrt{a^2 + b^2}}$
• Stewart's Theorem: Given a triangle $\triangle ABC$ with sides of length $a, b, c$ opposite vertices $A$, $B$, $C$, respectively. If cevian $AD$ is drawn so that $BD = m$, $DC = n$ and $AD = d$, we have that $b^2m + c^2n = amn + d^2a$.
• Volume of a tetrahedron with perpendicular sides $x,y,z$: $\dfrac{xyz}6$
• Polynomial remainder theorem, Menelaus' theorem, more general Vieta's ones. Nov 20 '16 at 6:56
• By now, mathematical contest training literature has grown to hundreds of books. Many of them gather theorems and formulas. Just one example: Chapter 2 of cs.elte.hu/~nagyzoli/compendium.pdf . Any answer to this question will only be a drop in the ocean. Nov 20 '16 at 7:06
• I solved problem 1, 6, and 9 from your link (I didn't wanna read the others) 1 and 6 are actually kinda interesting. Nov 20 '16 at 7:43
• @darijgrinberg A drop in the ocean is better than a dry ocean Nov 22 '16 at 0:05

The towers of Hanoi problem.

A puzzle with $n$ discs of different sizes arranged so that smaller discs always go on top of bigger discs.

We have to move the discs, one at a time, so that the tower is reassembled at peg B or C. When moving a disc we are only allowed to put a small disc on a larger one.

We want to know the minimum number of moves to achieve this.

Let $H(n)$ be the number of moves with $n$ discs.

Hence $H(1)=1$.

For a general case, we move $n-1$ discs to form a tower at peg B. So we need $H(n-1)$ moves.Then move remaining discs at A to C, then move discs from B onto larger discs at C. This again requires $H(n-1)$ moves.

$\therefore H(n) = 2H(n+1) +1$, for $n \ge 2$.

• What are some applications of this formula? Nov 27 '16 at 2:56
• Hello? Any reply? Dec 21 '16 at 3:56
• Hi sorry for the late reply, i need to be more observant of my notifications! The tower of hanoi problem essentially is just a game played by children but there are many variations of it and it used in a lot of assessment centres for jobs. Some other applications can be seen here en.wikipedia.org/wiki/Tower_of_Hanoi#Applications Dec 24 '16 at 16:09
• I fail to see how this comes any close to answering the question. Jan 9 '17 at 5:45