The 5th term of an arithmetic progression equals 3p−2 and the 23rd term equals 7p+22, where p is a real parameter. Answer the following:
(i) Express the first term a and the common difference d in terms of p.
(ii) Find all integer values of p for which d is a positive integer.
(iii) For each value of p obtained in part (ii), determine the sum of the first 30 terms.