Source: https://math.byu.edu/~pace/upper_bound_web.pdf