An efficient algorithm for computing the i th letter of 4 n a