If v is the initial velocity (which is increased after the first step), then in t steps the object moves v + (v + p) + (v + 2p) + ... + (v + (t - 1)p) pixels. This is the sum of an arithmetic progression, and it equals (t/2)(2v + (t-1)p). If the initial velocity is increased before the first step, then the number is (v + p) + (v + 2p) + ... + (v + tp) = (t/2)(2v + + (t+1)p).