r depends on n