A function f is defined by f(x)=3xn, where n is a real number different from −1. Let F(x) be an antiderivative of f such that the curve y=F(x) passes through the points (1,5) and (3,31).
(i) Write F(x) in terms of n and the constant of integration C.
(ii) Form equations by substituting the given points and hence find the exact values of n and C.