Rank functions for A_n quivers