Hi Friends 
I wrote this code about a week ago and can be used for batch in .bat format.
First copy the following text to a file.txt file and change it to file.bat. (You can name the file whatever you want:open_mouth:)
It is Arithmetic Progression on batch file (.bat)
Please send me your feedback
You can download it by (Click Here)
@ECHO OFF
Color e
Title Arithmetic Progression (By Alireza R)
:Start2
cls
goto Start
:Start
echo +-+-+-+-+-+------+-+-+-+-+-+
Echo +--Arithmetic Progression--+
echo +-+-+-+-+-+------+-+-+-+-+-+
echo.
echo.
echo *Formula : an=a1+(n-1)d
echo.
echo Enter the first number of the sequence [a1]:
set input1=
set /p input1= First Number :
if %input1%==%SCORE1% goto A
:A
cls
echo +-+-+-+-+-+------+-+-+-+-+-+
Echo +--Arithmetic Progression--+
echo +-+-+-+-+-+------+-+-+-+-+-+
echo.
echo.
echo *Formula : an=a1+(n-1)d
echo.
echo Enter the sentence number [n]:
set input2=
set /p input2= Sentence Number :
if %input2%==%SCORE2% goto B
:B
cls
echo +-+-+-+-+-+------+-+-+-+-+-+
Echo +--Arithmetic Progression--+
echo +-+-+-+-+-+------+-+-+-+-+-+
echo.
echo.
echo *Formula : an=a1+(n-1)d
echo.
echo Enter the distance [d]:
set input3=
set /p input3= Distance :
if %input3%==%SCORE3% goto C
:C
cls
echo +-+-+-+-+-+-+-+-+-+-+
Echo +--Donbaleh Hesabi--+
echo +-+-+-+-+-+-+-+-+-+-+
echo.
echo.
SET /A SCORE=%input2%-1
SET /A SCORE=%input1%+((%input2%-1)*%input3%)
ECHO Answer : %SCORE%
echo.
echo.
Echo Enter number [2] and press [Enter] for exit.
set input=
set /p input=
if %input%==2 goto E
:E
Exit