The first term of an Arithmetic Progression (A.P) is 2 and the last term is…