if the escalator has 20 steps to the top, and you get on at the bottom, and for every step you make, the escalator moves up 1 step, then by walking up the escalator you will have taken 10 steps to the top.
if you run (standing on every step), at say 2x the speed, then you will move up one step,as the number of steps remaining goes down by half. This means you will take 15 steps to reach the top.
However, most people would in fact, 'skip' every second step whilst running. If you take 2 steps in the same time as you'd take one walking, then you reduce you step count by half, making it 5 steps. but this time saved means there is still another 5 steps to climb, so that's an additional 2 steps more required making 7 steps in total.
If you do this at say 2x speed, then every stride taken you'll need to stride 0.5 a step less. Take 5 strides and that's you climbed 10 steps, with 2.5 steps 'gone' leaving 17.5 steps less 10 = 7.5 remaining. Take another 2 strides and that leaves 3.5, less 1 step leaves 2.5, so exactly another one stride. Total of 8 strides, if you skip a step and climb 2x speed.....
actually i've confused my self now.. ... but i think i rescued it...
So basically, walk as slow as possible, but take the biggest strides to get to the top quickest, but taking the least strides.