if the 8th term of an ap is 31