// 9,12,15,18,21..... clear; clc; close; a=9;//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)