@echo off
setlocal ENABLEDELAYEDEXPANSION
set expression=0
for /l %%i in (1,1,100) do set expression=!expression!+%%i
for /f %%i in ('set /a !expression!') do echo %%i
FOR /L %variable IN (start,step,end) DO command [command-parameters]
The set is a sequence of numbers from start to end, by step amount.
So (1,1,5) would generate the sequence 1 2 3 4 5 and (5,-1,1) would
generate the sequence (5 4 3 2 1)