Between the first term a1 = -1 and the fifth term a5 = 23, there is the distance of 24 units and 5-1 = 4 gaps
of equal length. Hence, each gap is = 6 units long.
Thus the common difference of this arithmetic progression is 6 units.
Then the formula for the n-th term of the progression is
= + (n-1)*d = -1 + 6*(n-1) = 6n -7.
ANSWER. The formula for the n-term is = -1 + 6*(n-1) or = 6n -7
You can chose any of these two versions: they are equivalent.