I have a vector X which can potentially contain a very large number of entries and I want to find the maximal index i such that X[i] <= a*i/m (for some constants a,m) and I'd really rather not loop over the vector. I thought about using Position but I can't figure out how to make a suitable function that would take into account the indexes of the vector.
I forgot to mention that the entries of the vector will be sorted so that might help.
Help would be appreciated