what is the solution or formula to get the next term of arithmethic sequence?