Finding equation of quadratic number pattern