  We present algorithms for computing ranks and order statistics in the Fareysequence, taking time O (n^{2/3}). This improves on the recent algorithms ofPawlewicz [European Symp. Alg. 2007], running in time O (n^{3/4}). We alsoinitiate the study of a more general algorithmic problem: counting primitivelattice points in planar shapes.
We present algorithms for computing ranks and order statistics in the Farey sequence, taking time O(n^{2/3}). This improves on the recent algorithms of Pawlewicz [European Symp. Alg. 2007], running in time O(n^{3/4}).