Which method is correct to finding the next number in pattern

Which Method Is Correct To Finding The Next Number In Pattern class=