search for A[i] == i