Proof of quadratic nth term