// 5,8,11,14,17..... clear; clc; close; a=5;//a is starting number of the series n=5;//given n=5 d=3;//difference between the numbers td=a+(n-1)*d; //formula to be used for arithmetic series mprintf("ans= %i",td)