What do you want b(1:19) to be?
You could set up the indexes in advance, but it will take about 3 to 4 times as long to do the vectorized way (for a million elements) as the loop way.
a = rand(1, 1000000);
b = a;
indexes = 21:length(a);
b = b(indexes - 1) + a(indexes);
b(i) = b(i-1) + a(i);
Elapsed time is 0.043703 seconds.
Elapsed time is 0.011023 seconds.