The work done by gravity is independent of the path taken. It depends only on the change in vertical displacement. Therefore, in both cases (pulled straight up and along the ramp), the work done remains the same as the vertical displacement is the same.
Let $ P_n = \alpha^n + \beta^n $, $ n \in \mathbb{N} $. If $ P_{10} = 123,\ P_9 = 76,\ P_8 = 47 $ and $ P_1 = 1 $, then the quadratic equation having roots $ \alpha $ and $ \frac{1}{\beta} $ is: