What is the common difference between the first term of a linear sequence is 3 and the 8th term is 31?